All Posts
AI Engineering November 11, 2026

RAG vs Fine Tuning: Teaching an LLM Your Product Catalog

Every commerce team that wants an LLM to answer questions about its products faces the same fork: retrieve the facts at query time, or bake them into the model. The answer depends on what changes and how often. Here is a practical way to decide, including the hybrid pattern most production systems end up using.

A merchant tells you they want an assistant that "knows the catalog." Then the questions start. Does it know that the blue jacket went out of stock this morning? Does it know the price changed at noon? Does it know that the new spring line replaced forty SKUs last week? Does it sound like the brand, or like a generic chatbot? Each of those questions has a different best answer, and conflating them is how teams end up spending a quarter fine tuning a model that is wrong by Friday.

The debate is usually framed as retrieval augmented generation versus fine tuning, as though you must pick one. You do not. They solve different problems. Retrieval gives a model facts it was never trained on. Fine tuning changes how a model behaves. A product catalog is a fast moving pile of facts wrapped in a consistent voice, so it needs both ideas, applied to the right layer. This guide covers how to separate them, how the hybrid pattern works, how to evaluate it, and where the cost and freshness tradeoffs land.

What Each Technique Actually Does

Retrieval augmented generation, or RAG, leaves the model unchanged. At query time your system searches a knowledge store, pulls back the most relevant product records, and places them in the prompt alongside the question. The model reads those records and answers from them. The knowledge lives outside the model, in a database or search index you control, which means you can update it without touching the model at all.

Fine tuning continues training a base model on your own examples so that its weights shift. The result is a model that has absorbed patterns from your data: your tone, your output structure, your domain vocabulary, your classification labels. What it absorbs poorly is volatile detail. Models trained on a fact do not store it like a database row. They store a blurry statistical impression of it, which is exactly why a tuned model will confidently state last season's price.

For a deeper look at the retrieval side, our RAG architecture for a Shopify Plus product catalog walks through ingestion and indexing in detail.

Why Catalogs Break Fine Tuning for Facts

Product data has three properties that make it a poor fit for baking into weights.

First, it changes constantly. Prices, availability, variants, promotions, and bundles move daily, sometimes hourly. A fine tuning run is a batch job with a data preparation step, a training step, an evaluation step, and a deployment step. Even a well automated pipeline turns around in hours or days, and the model is stale the moment it ships.

Second, it is precise. A shopper asking whether a part number fits their model needs an exact answer. Models trained on facts interpolate, and interpolation on a compatibility question produces a plausible wrong answer. Retrieval returns the actual record, which can be cited.

Third, it needs to be attributable. When an assistant states a return window or a material composition, someone in legal or support will eventually ask where that came from. A RAG answer can point to the source record. A tuned model cannot explain which training example it is echoing.

None of this means fine tuning is useless for commerce. It means facts belong in a database, and behavior belongs in the model.

Where RAG Wins

RAG is the right default whenever the answer depends on data that exists in a system of record. In a commerce context that covers most of what shoppers and support agents ask.

  • Product questions that depend on attributes: materials, dimensions, compatibility, ingredients, care instructions.
  • Anything time sensitive: price, stock, shipping cutoffs, active promotions.
  • Policy questions: returns, warranties, shipping zones, which should be answered from the current policy document.
  • Regulated or sensitive claims, where you need a citation and an audit trail.

The quality of a RAG system is mostly the quality of its retrieval. Chunking strategy, embedding model choice, hybrid keyword and vector search, metadata filtering, and reranking decide whether the right record reaches the prompt. A poor retriever with a great model still produces poor answers. If you are picking infrastructure for this layer, see our comparison of Pinecone, Qdrant and Weaviate for commerce vector search.

Where Fine Tuning Wins

Fine tuning earns its cost when the problem is about form rather than facts.

  • Brand voice: a consistent tone across thousands of descriptions, emails, and chat replies, without a long style guide in every prompt.
  • Strict output formats: emitting valid JSON that matches your PIM schema, or producing descriptions with a fixed structure of headline, bullets, and care notes.
  • Classification and extraction: mapping messy supplier titles to your taxonomy, tagging attributes, routing support tickets.
  • Cost at volume: a smaller tuned model can replace a larger prompted model on a narrow task, with shorter prompts.
  • Domain vocabulary: fashion, automotive, or industrial terms that a general model handles inconsistently.

A useful test: if you could solve the problem by writing a very good prompt with a few examples, try that first. Fine tuning is worth the operational overhead only when prompting plateaus, when the prompt becomes expensive at scale, or when consistency across a very large output volume matters. Our guide to LLM fine tuning for ecommerce covers the training side, including data preparation.

The Hybrid Pattern Most Production Systems Converge On

In practice the winning architecture separates concerns cleanly.

The retrieval layer supplies facts. A pipeline syncs your catalog, from Shopify, commercetools, or your PIM, into a search index, using webhooks or scheduled jobs so that changes land within minutes. Each product becomes one or more documents with structured metadata, such as category, availability, and region, so the retriever can filter before it searches.

The model layer supplies behavior. Either a prompted general model or a lightly tuned model receives the retrieved records and the question, and produces a response in the right voice and format. If you do fine tune, you train on examples that include retrieved context in the prompt. This matters: a model tuned on question and answer pairs without context learns to answer from memory, which teaches it to hallucinate. A model tuned on examples where the answer is grounded in supplied records learns to read the context and stay inside it.

The orchestration layer ties them together: query rewriting, retrieval, reranking, prompt assembly, generation, and a validation step that checks the output against the retrieved data. A simple and valuable validator confirms that any price or SKU in the answer appears in the retrieved records.

Teams often reach this design in stages: prompting plus RAG first, then a narrow fine tune to fix a specific behavior problem. Starting with fine tuning and adding retrieval later tends to be the expensive path.

Evaluation: Measure the Parts Separately

The reason many catalog assistants stall in production is that nobody can say whether a change made them better. Evaluation has to be built before tuning decisions, and it should score retrieval and generation separately.

For retrieval, build a labeled set of real shopper and agent questions, each mapped to the records that should be returned. Measure whether the right record appears in the top results. If retrieval fails, no amount of prompt or model work will help, and you will know where to spend effort.

For generation, score groundedness (does every claim trace to retrieved text), correctness against the source record, format compliance, and tone. Automated checks cover the mechanical parts, such as schema validity and price matching. For tone and helpfulness, use a rubric applied by human reviewers on a sample, and if you use an LLM as a judge, calibrate it against human scores first.

Add adversarial cases deliberately: out of stock items, discontinued products, and questions the catalog cannot answer, where the correct behavior is to say so.

Run the same evaluation set on every change to chunking, embeddings, prompts, or models, and keep traces in production so real failures feed back into the set. Our comparison of LangSmith and Langfuse for LLM evaluation and tracing covers tooling for this loop.

The Decision Framework

Question Lean RAG Lean fine tuning
Does the answer change daily? Yes No
Is the answer a specific record? Yes No
Is the problem tone, format, or labels? No Yes
Need citations or audit trail? Yes Hard to provide
Need per segment access control? Yes Not feasible
Prompt cost too high at volume? Compress context Often helps
Update turnaround Minutes Hours to days
Upfront effort Index and retriever Dataset, training, evaluation

Read it as a routing rule. Facts that change go to retrieval. Behavior that must be consistent goes to tuning, and only after prompting has been given a fair attempt. If a requirement sits in the middle, such as answering support questions in a precise house style, split it: retrieve the policy, tune the voice.

Cost and Freshness Tradeoffs

Illustrative reasoning, not measured figures: RAG shifts cost toward inference and infrastructure. Every request pays for retrieval and for the extra tokens of retrieved context, and you run an index and a sync pipeline. Prompt caching and tight context selection reduce that, and our piece on prompt caching for production LLM cost reduction shows how.

Fine tuning shifts cost toward upfront and recurring training work. You pay to prepare data, to train, and to evaluate, and you pay again every time the base model or your requirements change. A tuned model usually ties you to one provider's deprecation schedule, so factor in retuning when the base model is retired. Check current pricing with your provider.

Freshness is where the two differ most. RAG freshness is bounded by your index sync, which you can drive to minutes or seconds. Fine tuned freshness is bounded by your training cycle. For a catalog, that gap is usually decisive. A hybrid keeps the expensive, slow loop for the stable behavior and the cheap, fast loop for everything that moves.

What This Means for Your Business

The business risk in catalog AI is not a clumsy sentence. It is a confident wrong answer about price, stock, or compatibility, delivered to a customer who then acts on it. That risk is lowest when facts come from the system of record at the moment of the question, which is the argument for retrieval first.

Budget accordingly. Spend early effort on data quality, since a RAG system is only as accurate as the catalog it indexes: clean attributes, consistent taxonomy, complete descriptions. Spend on evaluation before spending on training. Treat fine tuning as a targeted optimization for voice, format, or cost, not as a way to make the model know your products. And monitor freshness, alerting when the index lags the source.

How Contra Collective Bridges the Gap

Contra Collective builds catalog aware AI systems on top of headless commerce stacks, including the sync pipelines, retrieval layers, evaluation harnesses, and targeted tuning that make answers both fresh and on brand. We start from what your data and shoppers actually need rather than from a preferred technique. If you are deciding where to invest, talk to our team.

Final Thoughts

RAG versus fine tuning is the wrong fight. Put facts that change in a retrieval layer you can update in minutes, put consistent behavior in the model through prompting first and tuning second, and evaluate retrieval and generation separately so you know what to fix. The teams that get this right ship an assistant that stays accurate as the catalog moves and still sounds like the brand. The teams that get it wrong train a model on this month's catalog and spend next month explaining why it is out of date.

[ 02 ] — Keep Reading

More from the lab.

Nov 14, 2026 AI Engineering
vs

Vercel AI SDK vs LangChain: Building AI Features Into Storefronts

The AI SDK is a thin TypeScript layer for streaming and tool calling. LangChain is a broad orchestration framework with an agent runtime and its own observability story. For storefront features, the right choice depends on how much of the workflow lives in the browser and how much lives in a backend graph.

Nov 7, 2026 AI Engineering

Postman's MCP Plugin Installed Itself Into Claude Code and Codex: What the Audit Trail Actually Shows

A developer running Postman Desktop 12.33.4 on macOS found their Claude Code settings and Codex config both quietly enabled with Postman's MCP plugin, logged under a source string that does not appear anywhere in Postman's public plugin repository. The GitHub issue, filed October 25, 2026, has sat open and unanswered. No data breach is proven here, the MCP server failed authentication in the reported case, but the consent gap is real and it is a pattern worth auditing for in your own agentic coding stack regardless of whether this specific vendor is the one that did it to you.

Ready when you are

Want to discuss this topic?

Start a Conversation