What Is an Ecommerce Knowledge Graph? Product Knowledge Graphs Explained for Shopify Brands

An ecommerce knowledge graph connects your products, variants, collections, content, policies and orders so AI can reason across them. Here's how a product knowledge graph works and what it changes for a Shopify brand.

Matthias Frisch profile pictureBy
โ€ข

What is an ecommerce knowledge graph?

An ecommerce knowledge graph is a structured map of an online store. It stores products, variants, collections, content, policies, orders and customers as connected entities, and records the relationships between them, such as "variant of", "belongs to collection" or "covered by policy". AI uses it to reason across those relationships instead of searching isolated pages, which makes answers, recommendations and automated actions more accurate.

A shopper asks your store chat: "Is the Alpine shell jacket waterproof, do you still have it in XL, and can I return it if I buy it in the sale?"

Three short questions. To answer them correctly, an AI needs a product attribute (the waterproof rating), a variant and its stock level (XL), the collection the product sits in (Sale), and the rule in your returns policy that applies to sale items. Those facts live on four different pages of your store. An AI that only searches pages will find some of them. An AI that understands how they connect will find all of them and give one answer that is actually right.

That connected structure is called a knowledge graph. This guide explains what an ecommerce knowledge graph is, how a product knowledge graph works, how it compares to a knowledge base, RAG and a vector database, and what it changes for a Shopify brand.

What is a knowledge graph?

A knowledge graph is a way of storing information as a network of things and the relationships between them. Every thing is a node (also called an entity) and every relationship is an edge. The smallest unit of knowledge is a fact made of three parts, often called a triple:

  • Alpine Shell Jacket โ†’ has waterproof rating โ†’ 20,000 mm
  • Alpine Shell Jacket XL โ†’ is a variant of โ†’ Alpine Shell Jacket
  • Sale collection โ†’ is covered by โ†’ final-sale returns rule

Each fact on its own is simple. The value comes from the connections: once facts share nodes, a machine can follow the path from one to the next and answer questions that no single page answers.

The idea went mainstream in 2012, when Google introduced its Knowledge Graph to understand real-world entities instead of just matching keywords. The same principle now sits behind product search at Amazon, recommendation systems across retail and, increasingly, the AI agents that talk to your customers.

What is a product knowledge graph?

A product knowledge graph applies this model to a catalog. Products become nodes, and so do the things that describe them: brands, product types, materials, sizes, colours, use cases and compatible accessories. Edges record how they relate, so the graph knows that a jacket is a type of outerwear, uses a specific membrane, comes in five sizes and pairs with a particular hood.

An ecommerce knowledge graph (at Flyweight we call it a commerce knowledge graph) goes one step further. It connects the catalog to everything else your store knows:

EntityExamples in a Shopify storeTypical relationships
Products and variantsAlpine Shell Jacket, size XL, colour Navyvariant of, in stock, priced at
Collections and taxonomyOuterwear, Sale, New Inbelongs to, is a type of
Product attributesWaterproof rating, material, fithas attribute, compatible with
ContentSize guide, FAQs, blog articlesexplains, answers
PoliciesReturns, shipping, warrantyapplies to, excludes
Orders and customersOrder #8412, fulfilment statuscontains, placed by, eligible for
Connected systemsHelpdesk, Klaviyo, fulfilment toolsynced with, triggers

The difference matters. A product graph helps a machine understand what you sell. An ecommerce knowledge graph helps it understand how your business works: which rules apply to which products, what a customer has already ordered, and what the AI is allowed to do next.

How it works: one customer question, step by step

Go back to the jacket question. This is how an AI agent answers it when it can reason over a graph:

  1. Identify the entity. "Alpine shell jacket" is matched to one product node, even if the shopper misspells it or uses a synonym.
  2. Read the attribute. The product has a waterproof-rating edge, so the agent states the actual rating instead of guessing from the word "shell".
  3. Check the variant. It follows the edge to the XL variant and reads the current stock.
  4. Find the right rule. The product sits in the Sale collection, and that collection is linked to a specific clause in the returns policy.
  5. Answer in one go. In this example store: "Yes, it's rated 20,000 mm, XL is in stock, and sale items can be returned within 14 days for store credit."

Without the graph, the AI retrieves a handful of text snippets that look similar to the question and hopes the right ones are among them. If the returns page describes the general 30-day rule at the top and the sale exception at the bottom, the snippet it happens to pick decides whether the answer is right. This is where most wrong chatbot answers come from: not missing information, but missing connections between pieces of information.

Knowledge graph vs knowledge base vs RAG vs vector database

These terms get mixed up, partly because they are often used together. Here is how they differ.

ApproachWhat it isHow the AI uses itWhere it falls short
Knowledge baseA collection of documents: FAQs, help articles, policy pagesSearches for the most relevant articleFacts are locked inside text; relationships between articles are not explicit
Vector databaseStores text as embeddings, numeric representations of meaningFinds passages that are semantically similar to the querySimilar is not the same as correct; it can't follow a chain like product โ†’ collection โ†’ policy
RAG (retrieval-augmented generation)A method: retrieve relevant content, then let a large language model write the answerGrounds answers in your content instead of the model's training dataOnly as good as what it retrieves; multi-step questions often miss a piece
Knowledge graphEntities plus explicit relationships between themFollows relationships to collect exactly the facts a question needsNeeds structuring and ongoing maintenance

Is a knowledge graph better than RAG? They solve different problems, and the strongest systems combine them. RAG makes sure the AI answers from your data rather than from memory. A knowledge graph makes sure the retrieved data is connected correctly. The combination is often called GraphRAG: the graph decides which facts belong together, and the language model turns them into a natural answer.

The same applies to knowledge base vs knowledge graph. Your FAQs and help articles don't become obsolete; they become inputs. The graph links each article to the products, collections and policies it talks about, so the right article surfaces for the right product.

Knowledge graph examples in ecommerce

Large retailers have invested in product knowledge graphs for years, mostly to power search and recommendations.

  • Amazon builds its product graph largely automatically. Amazon Science reports that its AutoKnow system tripled the number of facts in the graph by extracting and cleaning product attributes at scale.
  • DoorDash uses LLMs to extract product attributes from unstructured SKU data and adds them to its product knowledge graph, which feeds personalised search and recommendations.
  • Google runs a Shopping Graph of products, sellers, prices and reviews alongside its Knowledge Graph. The structured data on your product pages is one of the ways your catalog gets into it.
  • A mid-sized Shopify brand can use the same logic at a smaller scale. A store with 800 SKUs, a size guide, three shipping zones and a returns policy with two exceptions already has everything a useful graph needs. What's usually missing is the time to build it by hand.

What an ecommerce knowledge graph lets AI do

For a Shopify brand, the practical use cases are less about data science and more about getting everyday answers and actions right, which is what shapes the customer experience.

Smarter product recommendations

Recommendations can be based on real product attributes and customer needs, not only on "customers also bought". A shopper who says "I run long distances in the rain" can be matched on waterproofing, weight and fit. Attribute-based personalization also softens the cold-start problem: a brand-new product has no sales history yet, but it does have attributes.

Clear comparisons between products and variants

When attributes are stored as comparable fields instead of prose, the AI can explain exactly how two models or two variants differ, without mixing up specs from neighbouring product descriptions.

Compatibility and cross-selling

"Does this filter fit my machine?" is a relationship question. With compatible-with edges, the AI can answer confidently and suggest the right accessory rather than a random bestseller.

Accurate, store-specific policies

Policy exceptions for sale items, personalised products or international orders are linked to the products they apply to. The AI applies your rules, not the most common rule on the internet.

Context-aware support and safe actions

Connecting orders and customer context lets the AI answer "where is my order?" with real data. Before it changes a shipping address or cancels an order, it checks fulfilment status and your business rules first. That check is what makes AI process automation safe to switch on.

Better product discovery and search

Onsite search that understands that "rain jacket" and "waterproof shell" belong to the same product type returns fewer empty results (more on that in our guide to AI search for Shopify). The same discipline, clean attributes and a consistent taxonomy, also makes your product pages easier for Google and AI search engines to understand.

How to build a product knowledge graph, and where it gets hard

If you were to build one from scratch, the process usually looks like this:

  1. Define entities and taxonomy. Decide which product categories, product types, product attributes and relationships matter for your catalog and your customers' questions.
  2. Extract attributes from unstructured data. Most product information sits in titles, product descriptions and images rather than clean fields. Natural language processing (NLP) and large language models are used to turn text into attribute-value pairs.
  3. Resolve duplicates. "Navy", "dark blue" and "marine" might be one colour; two supplier names might be one brand.
  4. Connect content, policies and orders. Link FAQs, guides and policy clauses to the products and collections they refer to, and connect live order data.
  5. Keep it current. New products, price changes and policy updates have to flow into the graph continuously, or answers go stale.

The challenges are predictable: messy product data spread across several data sources, inconsistent attributes across collections, the effort of keeping everything in sync, and making the setup scalable as the catalog grows. Large retailers solve this with dedicated teams, machine learning pipelines and graph databases. That is exactly why knowledge graphs stayed rare among small and mid-sized online stores, even though the underlying data was already there.

Are knowledge graphs still relevant in the age of LLMs?

More than ever. LLMs are very good at language and unreliable with facts they weren't given. When information is missing or ambiguous, they tend to fill the gap with a plausible-sounding answer, which is what people call an AI hallucination. A knowledge graph gives the model a structured, verifiable source to ground its answers in.

Google still relies on its Knowledge Graph, and AI search engines favour clearly structured, well-connected information when deciding which brands and products to mention. The direction in AI isn't away from knowledge graphs; it's towards combining them with language models.

How Flyweight turns your Shopify store into a commerce knowledge graph

Most Shopify brands don't need to build any of this themselves, because the source material is already in the store. Flyweight connects products, variants, collections, pages, blogs, FAQs, store structure, order information, stock, metafields, marketplaces, policies and languages into a Commerce Knowledge Graph. Additional sources such as Zendesk, content metafields or file uploads can be added.

This is a commerce-native form of GraphRAG: the graph decides which facts belong together, and a language model turns them into a natural answer. The difference from a text-only GraphRAG setup is where the graph comes from. Instead of scraping prose and hoping the extraction is right, Flyweight builds the graph largely from data that is already structured in Shopify, where products, variants, orders and collections are first-class entities with real relationships.

  • No maintenance. The graph is built from your existing store content and refreshes automatically every night, so new products, content and policy changes are picked up without manual work.
  • One source for answers and actions. The same graph powers AI Sales & Support conversations and AI Process Automation, where the agent checks what is allowed before it acts.
  • You stay in control. You can add knowledge through metafields and extra content, or exclude content you don't want the AI to use.

Frequently Asked Questions

Can you give me an example of a knowledge graph?
Google's Knowledge Graph is the best-known one: it links people, places and organisations so search can show facts directly. In ecommerce, a simple example is a product node linked to its variants, its collection, its size guide and the returns rule that applies to it.
What is the difference between a knowledge base and a knowledge graph?
A knowledge base stores documents; a knowledge graph stores facts and the relationships between them. Many systems use both: the knowledge base provides the content, and the graph connects it to the right products, policies and customers.
Is a knowledge graph the same as a graph database?
No. A graph database, such as Neo4j, is a technology for storing connected data. A knowledge graph is the model of knowledge itself: the entities, relationships and rules. You can store a knowledge graph in a graph database, but you don't have to.
Do I need technical skills to use a knowledge graph on Shopify?
Not with Flyweight. The Commerce Knowledge Graph is created from your existing Shopify store data and kept up to date automatically. Your team stays the expert on your products and policies; the graph turns that knowledge into a reliable foundation for every AI answer and action.

Get Started Today

Try your own AI chatbot for free and see how it grows your business. 7 days free, no limits on traffic or AI chats.

Click "Install" to add the "Flyweight AI" app to your Shopifyยฎ store. No credit card needed, no signup required.

Built for Shopify