All Posts
Engineering December 15, 2025 8 min read

LLM Fine Tuning for Ecommerce: Practical Patterns and Pitfalls

When to fine tune a foundation model vs. using RAG and how to avoid the mistakes that waste months of effort.

Fine tuning is one of the most misunderstood concepts in applied AI. The promise is compelling: take a foundation model and adapt it to your specific domain, making it more accurate, more aligned with your brand voice, and more capable for your use case. The reality is more nuanced. Fine tuning is powerful in specific scenarios and wasteful in others, and the scenarios where it truly pays off are narrower than most people expect.

Here's an honest guide based on what we've built.

Fine Tuning vs. RAG: The First Decision

Before deciding to fine tune, ask whether RAG (Retrieval Augmented Generation) achieves the same goal. For most ecommerce use cases, it does.

Use RAG when:

  • The model needs access to your current product catalog, pricing, or inventory
  • You need to ground responses in your specific policies and documentation
  • Your knowledge base changes frequently
  • You need traceable, auditable citations for the model's responses

RAG gives the model access to your data without teaching the model to know it. It's faster, cheaper, and more maintainable for most use cases.

Fine tune when:

  • You need the model to consistently produce output in a specific format or style that prompting can't achieve reliably
  • You have labeled data that demonstrates a task the base model can't perform adequately
  • You need to reduce inference cost by using a smaller model that matches a larger model's quality for a specific task
  • You're teaching the model domain vocabulary or concepts not well represented in its training data

The key insight: fine tuning teaches format and style; RAG provides knowledge. Most ecommerce applications need knowledge, not a different format.

Ecommerce Use Cases Where Fine Tuning Delivers

Product Description Generation

Foundation models generate reasonable product descriptions, but they're generic. A fine tuned model can learn your specific brand voice, product taxonomy vocabulary, and the attribute patterns that drive conversion in your category.

Training data: 500 to 2000 examples of input attributes mapped to final product descriptions that performed well. This teaches the model which attributes to emphasize, how to structure the copy, and what language matches your brand.

Typical improvement: 30 to 50% reduction in human editing time post generation.

Category and Attribute Classification

Given an unstructured product title from a supplier feed, classify it into your product taxonomy. Foundation models can do this via prompting, but fine tuned models are faster, cheaper, and more accurate for large scale catalog operations.

Training data: Existing classified products (supplier title mapped to taxonomy category + attributes). Typically 1000+ examples per category tree level.

Typical improvement: 90%+ accuracy vs. 70 to 80% for prompted foundation models, at 10x lower inference cost using a small fine tuned model.

Search Query Rewriting

Translating vague customer search queries into structured product attribute filters. "Something red and flowy for a wedding" translates to {occasion: wedding, color: red, silhouette: flowy}. Fine tuned models specialized for your attribute ontology outperform generic models significantly.

Review Sentiment and Attribute Extraction

Extracting structured insights from customer reviews: "Great for beginners but the handle is uncomfortable after 20 minutes" maps to {overall_sentiment: positive, mentions_difficulty: false, attribute_issue: handle_comfort, use_case: beginner}.

The Fine Tuning Process

Data Collection and Curation

Your fine tuning data quality determines your model quality. The most common mistake: using too much low quality data.

For 500 examples curated by domain experts, you'll typically outperform 5,000 examples scraped from production with no quality control. Invest in curation.

Each example should be:

  • Representative of the input distribution the model will see in production
  • Labeled with the ideal output (not just a "good enough" output)
  • Checked for consistency (contradictory examples confuse the model)

Training Configuration

OpenAI's fine tuning API supports GPT-4o-mini and GPT-3.5-turbo for supervised fine tuning. For most ecommerce classification and generation tasks, GPT-4o-mini fine tuned is a strong cost performance balance.

Start with a small number of epochs (1 to 3). More epochs increase overfitting risk, especially with smaller datasets.

Evaluation

Split your data: 80% training, 20% held out eval. Evaluate on the held out set with task specific metrics, not just loss:

  • Classification tasks: accuracy, precision, recall per class
  • Generation tasks: human evaluation on a sample, or automated metrics specific to your domain

Never deploy a fine tuned model without evaluating it against your baseline (prompted foundation model) on the same eval set.

Common Pitfalls

Overfitting on a small dataset: With fewer than 200 examples, you're likely to overfit. The model memorizes training examples instead of learning generalizable patterns.

Dataset leakage: If eval examples appear in training data, your eval metrics are meaningless. Use explicit data splits and verify there's no overlap.

Ignoring regression: Fine tuning for one task degrades performance on related tasks. Evaluate your fine tuned model across the full range of tasks it will perform, not just the one you optimized for.

Skipping baseline comparison: Fine tuning takes weeks. Make sure you've actually maxed out what prompting can achieve before investing in fine tuning.

[ 02 ] — Keep Reading

More from the lab.

Oct 4, 2026 Engineering

NetSuite's Native AI Agents vs Custom MCP Tools: What Actually Moves the Needle in 2026

NetSuite 2026.2 brings Ask Oracle, a conversational assistant for natural language questions over your ERP data, and AI Canvas, a workspace for organizing the scorecards and charts that come out of that conversation. Both ship native, inside the NetSuite Next experience, available now in the United States and Canada. That is real progress on the question teams have been building custom NetSuite integrations to answer for years. It is also not the same question as whether to build a custom Model Context Protocol tool against your own schema, which remains the highest leverage move for anything Ask Oracle was never designed to touch.

Sep 28, 2026 Engineering

Adobe Commerce's September 2026 Storefront Release: What B2B and Headless Teams Need to Verify

Adobe shipped its September 2026 Commerce Storefront release with six changes worth a headless or B2B team's attention: Free Gift Selection, an expanded Payment Services drop in with Google Pay and PayPal Buttons, Multiple Named Wishlists, a shared B2B Company Address Book with role based permissions, accessibility improvements across cart and account, and a reCAPTCHA fix for B2B company registration. Five of these are low risk component updates. The sixth ships with an action item, passing an explicit configuration flag, that will break company registration on B2B enabled backends if a team skips it. This post walks through what shipped, the versions behind it, and a verification checklist to run before this release reaches production.

Sep 28, 2026 Engineering

Claude Code's Permanent 17 Percent Usage Cut: What Changed and How to Budget For It

If your team's Claude Code usage suddenly feels tighter this month, the numbers explain why. A temporary 50 percent weekly limit boost expired on August 31, 2026, and the permanent replacement that took effect September 14 is a 25 percent increase, not a 50 percent one. Anthropic said so directly in its own announcement: compared to the boosted summer level, this works out to a 17 percent reduction in weekly limits on Claude Code. That is an unusually plain admission from a vendor, and it is worth taking at face value rather than decoding it as marketing language. This post lays out the full timeline from May through September, why the separate 5 hour session change does not offset the weekly cut, and three concrete steps for budgeting a team's Claude Code usage against the new permanent ceiling.

Ready when you are

Want to discuss this topic?

Start a Conversation