BookbagBookbag
Glossary

Large Language Model (LLM)

A large language model (LLM) is a neural network trained on massive corpora of text that learns statistical patterns in language well enough to understand questions, summarize information, generate coherent prose, and reason through multi-step problems.

Also covered on this page: Fine-Tuning, Context Window, Training Data.

What it means

Key insight

LLMs are the engine inside modern AI support tools — they're what makes the difference between a bot that sounds robotic and one that actually reads like a person.

Large language models like GPT-4, Claude, and Gemini are trained on hundreds of billions of tokens of text using a technique called self-supervised learning, where the model learns to predict the next word in a sequence. At scale, this simple objective produces models that develop rich representations of language, facts, and reasoning. In practice, an LLM can read a customer's message, understand what they want, retrieve relevant policy information, and compose a helpful, on-brand response — all in under a second. For customer support applications, LLMs are most effective when their outputs are grounded in a specific knowledge base (through retrieval-augmented generation) rather than relying purely on their training data, which prevents them from making up information about your specific store's policies.

Why it matters

LLMs made practical AI customer support possible. Before them, chatbot builders had to manually author hundreds of intent-response pairs and still failed when customers phrased things unexpectedly. LLMs understand meaning, not just keywords, so they handle the full range of how real customers express themselves. For Shopify merchants, this means support AI that actually works on the first day without years of manual training data collection — and that continues to improve as the underlying models improve.

Related concepts, explained

These terms are part of the same idea, so they live here rather than on pages of their own.

Fine-Tuning

Fine-tuning is the process of taking a pre-trained large language model and continuing its training on a smaller, domain-specific dataset, adjusting the model's weights so it performs better on targeted tasks or better reflects a specific tone, domain vocabulary, or response style.

Pre-trained LLMs are excellent generalists but may lack precision on highly specific domains or produce responses in a generic style that doesn't match a brand's voice. Fine-tuning addresses this by exposing the model to carefully curated examples of the desired input-output behavior — for example, pairs of customer questions and ideal support responses. The model adjusts its weights to be more likely to produce that style and content. In ecommerce support, fine-tuning is most valuable for teaching the model a brand's specific terminology, response tone, and handling of brand-specific edge cases. However, fine-tuning has a significant limitation for knowledge: it can embed style and reasoning patterns, but for factual accuracy about current policies and inventory, retrieval-augmented generation is more practical and maintainable because it doesn't require retraining every time something changes.

For Shopify brands with distinctive voices — luxury goods, niche communities, high-touch service expectations — the generic tone of an untuned LLM can feel off-brand in customer interactions. Fine-tuning aligns the AI's communication style with the brand's identity, making support interactions feel consistent with the broader customer experience. That said, most merchants get better ROI from investing in their knowledge base (RAG) than in fine-tuning, especially in the early stages of AI deployment.

Context Window

A context window is the maximum amount of text (measured in tokens) that a large language model can process in a single inference — encompassing the system prompt, conversation history, retrieved documents, and any other inputs provided at the time of generation.

Every time an LLM generates a response, it can only "see" the text within its context window. For a customer support AI, this window must contain: the system prompt with instructions and persona, any relevant knowledge base content retrieved for this query, the full conversation history so far, and the current customer message. Context windows are measured in tokens (roughly 0.75 words each) and range from 4,000 tokens in older models to over 1 million in the latest. For most support conversations, context size isn't a bottleneck — a typical chat exchange fits comfortably in even a modest window. It matters most in long conversations, when large policy documents need to be included verbatim, or when integrating extensive product catalog information into every response.

Context window constraints affect how an AI support system must be architected. If a store's return policy document is too long to fit in the window alongside conversation history and other context, the RAG system must be carefully designed to extract only the most relevant excerpts rather than including the full document. For ecommerce support, this is rarely a blocking issue with modern models, but understanding context limits helps when debugging cases where an AI seems to "forget" something said earlier in a long conversation — the likely cause is that earlier content has been pushed out of the window.

Training Data

Training data is the labeled or unlabeled dataset used to teach a machine learning or AI model the patterns, relationships, and behaviors it should exhibit — in customer support contexts, this includes historical conversation logs, labeled intent examples, and curated knowledge base documents.

All machine learning models learn from data. For a large language model, training data is the vast corpus of text (books, websites, code) used in the initial pre-training phase. For a customer support AI specifically, training data refers more narrowly to the inputs used to adapt the model to your use case: labeled examples of intents ("here are 50 examples of customers asking about returns"), historical conversation transcripts used to fine-tune tone and handling, and the knowledge base documents that ground the AI's factual responses. Data quality matters enormously — mislabeled intents produce a classifier that systematically misroutes customers, historical conversations that include wrong answers teach the AI to repeat those mistakes, and incomplete knowledge base documents produce confident-sounding gaps. Curating and maintaining training data is ongoing work, not a one-time setup task.

For Shopify merchants deploying AI support, the practical implication of training data is this: the AI's quality ceiling is set by the data you provide. A brand with years of well-organized support transcripts, a comprehensive knowledge base, and carefully labeled edge cases will get a dramatically better AI than one starting with nothing. This doesn't mean AI is out of reach for new stores — pre-trained LLMs plus a good knowledge base get you most of the way there — but investing in quality training data pays compounding returns as the AI handles increasingly complex cases.

How Bookbag helps

Best-in-Class Model Selection

Bookbag routes customer queries to the most appropriate LLM for the task — balancing response quality, latency, and cost so customers get fast, accurate answers without paying for unnecessary compute.

Grounded Responses

Bookbag combines LLM reasoning with retrieval from your store's specific knowledge base, so the model generates responses that are accurate to your actual policies rather than generic training data.

Continuous Model Improvements

As frontier LLMs improve, Bookbag automatically benefits — the same customer support deployment becomes more capable over time without any retraining work on your part.

Frequently Asked Questions

Yes — this is called hallucination, and it's a real risk when an LLM relies only on its training data. The solution is RAG (retrieval-augmented generation), which forces the model to base its response on documents you've provided, dramatically reducing fabrication.

No. Tools like Bookbag abstract the LLM layer entirely — you configure your store policies and tone, and the LLM handles the language understanding and generation behind the scenes.

LLMs are probabilistic — they sample from a distribution of likely next tokens, so responses vary slightly between runs. This can be reduced by lowering the "temperature" setting, which makes the model more deterministic.

For most stores, no — RAG plus prompt engineering delivers better accuracy with far less effort and cost than fine-tuning. Fine-tuning is worth considering when you have specific style requirements, specialized vocabulary, or a large corpus of high-quality historical support conversations to train on.

Older messages get truncated or dropped. A well-designed system summarizes them rather than discarding them entirely, preserving key facts like order numbers and stated issues even as the full transcript is compressed.

You can start with zero historical transcripts — Bookbag bootstraps from your knowledge base documents and Shopify catalog data. Historical conversations improve performance over time but aren't a prerequisite for launch.

See Bookbag in action

Join the ecommerce teams resolving more tickets, answering 24/7, and turning support into a revenue channel with Bookbag.