Semantic Product Search: How It Works & Benefits

The guide

Query your table as a graph.Petabytes. Subsecond. No data movement.

Free downloadBook demo

Semantic Product Search: How It Works & Benefits

Product search has to connect a shopper's intent to something they can buy. A request for a lightweight camera kit for hiking expresses a use case; a catalog might describe compact bodies, interchangeable lenses, and carrying weight. Matching those descriptions is useful only if the returned kit also meets the shopper's budget and is available to order.

This article explains how semantic product search makes those connections, where AI and embeddings fit, and how to build and evaluate the surrounding system. The central engineering task is combining relevance with the catalog facts that make a result purchasable.

Semantic product search retrieves and ranks products using representations of meaning and context. It aims to connect a query with relevant catalog entries even when their wording differs. Dense vector retrieval is one common implementation: queries and product descriptions are encoded into a compatible vector space and compared for similarity, as described in the Sentence Transformers documentation.

For commerce, relevance includes the requested product type, intended use, and explicit requirements. A camera bag is related to a camera, but it does not satisfy a request to buy one. Likewise, a kit above a stated budget may be topically relevant while remaining ineligible.

Semantic search can return an ordinary product grid. It does not require a chatbot or generated answer. Recommendations can use similar models, but may start from browsing history or another product instead of an explicit search query.

How does semantic product search work?

Consider an illustrative request: lightweight camera kit for hiking under $800. A practical search pipeline divides the work into several stages.

Prepare the catalog. Create searchable records from titles, descriptions, categories, and verified attributes. Retain stable product and variant identifiers. Keep numerical prices, currency, inventory, and compatibility information available as structured fields rather than relying on their presence in descriptive text.

Interpret the request. Identify camera kits as the requested category and hiking as the intended use. Treat the budget as a numerical constraint in the storefront's currency. Lightweight remains a preference unless the shopper specifies a weight limit or the application has an explicit rule for it.

Retrieve candidates. Lexical retrieval finds matching terms and identifiers. Vector retrieval finds descriptions close to the encoded request. A hybrid approach merges their candidates; reciprocal rank fusion combines ranked lists without requiring their raw scores to share a scale.

Rank eligible products. Apply enforceable constraints and rank the remaining candidates for relevance. A reranker can compare the complete query with each candidate's attributes. Recheck volatile facts before presenting price and availability, and link the result to the variant that actually satisfies the request.

Each stage has a separate responsibility. Ranking cannot recover a relevant kit that candidate retrieval never found, and semantic similarity cannot establish that its components are in stock.

Key search type comparisons

The useful comparison is between retrieval approaches. Semantic search describes the goal; vector search supplies one mechanism for reaching it.

DimensionLexical retrievalDense vector retrievalHybrid retrieval
Matching basisTerms and indexed fields, with configured text analysisSimilarity between learned query and product representationsCandidates or rankings from both approaches
Useful query shapeExact SKU, model name, distinctive attributeDescriptive request, occasion, intended useA mixture of identifiers and broader intent
Vocabulary handlingSynonyms and spelling rules can expand matchesLearned associations can connect different wordingUses both configured and learned associations
Typical failureMisses relevant products expressed differentlyRetrieves related products that fail the requestFusion gives inappropriate weight to one candidate source
Main tuning workField weights, analyzers, synonym rulesRepresentation quality and nearest-neighbor retrievalCandidate coverage and fusion or ranking policy

Elastic's hybrid-search documentation describes combining full-text and vector results into one ranking. That combination is a useful starting point when a store receives both exact-item queries and exploratory requests, but it still needs evaluation against the catalog.

Faceted search is complementary: size, mount, price, and availability filters can accompany any of these approaches. Personalization is another separate choice. It should help order relevant results without silently overriding an explicit requirement.

Natural language processing helps interpret how words relate within a request. In camera search, light could describe carrying weight, lighting equipment, or low-light performance. The surrounding phrase supplies the context needed to choose among them.

An implementation can extract product categories, brands, model identifiers, units, and constraints into a structured request. Preserve the original query alongside that interpretation. If a parser treats under $800 as a preference rather than a limit, the application needs enough trace information to identify that error.

AI also supports ranking. A bi-encoder represents queries and products separately, allowing product vectors to be prepared ahead of time. A cross-encoder processes a query and candidate together to score their relevance. The Sentence Transformers retrieve-and-rerank guide explains why the more expensive joint scoring is typically applied to a smaller candidate set.

An LLM can add conversational interpretation, such as carrying a budget into a follow-up request for a smaller kit. Design that interaction to preserve explicit constraints and ask for missing details when necessary. Any explanation of why a product qualifies should come from retrieved attributes. The language model's familiarity with a camera family is insufficient evidence about the particular variant being sold.

An embedding represents input as a numerical vector. Training shapes which inputs lie near one another. The Sentence-BERT paper demonstrates representations that can be compared using cosine similarity, enabling semantic matching without jointly processing every possible text pair.

For the hiking query, a suitable representation may connect lightweight with descriptions of compact travel equipment. This broadens candidate discovery beyond shared words. The quality of that connection depends on the model and the product information it receives.

Construct product text deliberately. Include useful category and attribute context, remove repetitive promotional copy, and retain variant distinctions. A generic description shared by every lens in a family provides little evidence about which mount a particular SKU supports. Keep exact compatibility checks in structured data.

Query and product encoders must produce compatible representations. Equal vector dimensions alone do not establish that compatibility; use the model's documented query and document encoding paths. Model migrations therefore need a versioned index and a validated transition plan.

Multimodal models extend this idea to text and images. The CLIP research describes learning visual representations from language supervision. Such representations can support visual discovery, but an image cannot reliably establish hidden specifications such as a connector's supported protocol. Evaluate visual resemblance and technical suitability separately.

Semantic product search architecture

A practical architecture separates index preparation from request serving, with catalog identity connecting the two.

The preparation path consumes product updates, normalizes attributes, constructs searchable text, generates embeddings, and updates lexical and vector indexes. Every indexed record should map back to its source product and variant. Deletions and discontinued listings need the same reliable propagation as additions.

The serving path interprets a request, retrieves candidates, combines rankings, applies eligibility rules, and prepares result cards. Inventory and pricing updates may follow a faster path than descriptive content. Keep these facts independently updateable so a price change does not require regenerating an otherwise unchanged description's embedding.

Semantic product search architecture

Figure: Search indexes supply candidates. Variant checks, price and inventory updates, and optional kit relationships determine which results are eligible to display.

Variant handling deserves explicit design. A product family may include an affordable body-only option and a more expensive lens kit. Returning the family with the cheapest price can misrepresent whether the requested kit qualifies. Google's catalog documentation distinguishes primary products, variants, and inventory, illustrating why these identities matter.

Finally, log the query interpretation, candidate IDs, model versions, exclusion reasons, and displayed variants. That trace lets engineers distinguish a retrieval miss from a stale inventory record or an incorrectly applied filter.

How to build a semantic product search engine

Start with a narrow catalog slice and representative shopping requests. Expand once the retrieval and eligibility behavior is measurable.

Define acceptable results. Collect exact-SKU searches, descriptive queries, misspellings, compatibility requests, and queries with no valid answer. Label products according to the requested task. Amazon's Shopping Queries Dataset separates Exact, Substitute, Complement, and Irrelevant matches. Those distinctions are useful: a complementary lens should not be treated as a successful camera result.

Establish a lexical baseline. Index reliable titles and attributes, configure identifier matching, and make filters work correctly. Record which queries fail and why. This creates a concrete test for whether embeddings improve coverage without damaging exact-item lookup.

Add and evaluate semantic retrieval. Build product representations, retrieve vector candidates, and compare lexical, vector, and hybrid configurations on the same judgments. Choose an engine based on its filtering, update, and operational behavior as well as retrieval quality. Keep an exact vector-search reference for evaluating approximate-index losses on a manageable sample.

Introduce reranking and safe rollout. Add a reranker only when candidate coverage is adequate. Measure its contribution and latency separately. Keep an earlier working configuration available, define timeout behavior, and test missing attributes, unavailable variants, and empty eligible result sets before exposing the change broadly.

Some catalog questions require explicit relationships. A camera kit assembled to order may contain a smaller accessory bundle, which itself requires batteries and a charger. Before offering the complete kit, the application needs to follow every required-component path and compare the quantities needed with available inventory.

PuppyGraph is the first and only zero-ETL graph query engine that makes these catalog relationships queryable over existing tables. Its distributed engine reads tables in place in SQL databases, data warehouses, and data lakes or lakehouses, including direct reads of Iceberg and Delta Lake, without ETL into a separate graph database. Connect the sources, define a graph schema mapping tables to nodes and edges, and query with openCypher and Gremlin while the same tables remain available to SQL.

Comparison of the best data lakehouse solutions

Figure: PuppyGraph queries the existing tables in place, so graph and SQL queries share one copy of the data and no pipeline keeps a graph copy in sync.

The built-in AI assistant can propose that model from connected tables for review. In this design, the application passes candidate kit IDs into relationship queries and uses the results for eligibility checks. Embedding generation and search-index maintenance remain separate; the commerce system still owns inventory reservation at checkout.

Comparison of the best data lakehouse solutions

Figure: Companies that use PuppyGraph.

Comparison of the best data lakehouse solutions

Figure: Engineering teams at PuppyGraph customers on what they use it for.

Semantic product search examples

Occasion-based apparel discovery. Shopify documents a search for Christmas party shoes that can return red pumps even when the product wording does not include the occasion. Its storefront-search documentation attributes semantic understanding to product information and relationships between concepts. This is a documented example of connecting shopping language with catalog descriptions.

Use-case discovery in electronics. In the illustrative hiking scenario, compact camera kits can be candidates even when their titles omit hiking. The result still needs to satisfy the budget and identify the included lens and accessories. A camera body sold alone is a different offer.

Replacement-part lookup. Consider a shopper asking for a quiet replacement fan for a particular appliance model. Semantic retrieval can help interpret the desired characteristic; an exact model or part relationship must establish fit. Similar descriptions do not prove interchangeability.

Visual homeware discovery. A shopper could search using a photograph of a woven pendant light. Image retrieval can surface visually similar products, while dimensions, material, and electrical specifications determine which options meet the request. This is an illustrative application pattern, not a claim about a particular retailer's implementation.

Broader vocabulary coverage. Shoppers can describe a purpose or characteristic without knowing the catalog's terminology. When relevant products exist, better matching can reduce failed searches caused by wording differences.

More useful discovery. Descriptive queries can surface alternatives across brands and product families. For new products, content-based representations provide a retrieval signal before extensive interaction history exists. Good catalog information remains necessary.

Less query reformulation. If the system correctly interprets an occasion or intended use, shoppers may need fewer attempts to reach a useful result. Measure that behavior alongside successful product selection; fewer searches can also mean abandonment.

Potential commercial improvement. More relevant, purchasable results can support conversion and customer satisfaction. The size and direction of that effect must come from an experiment on the store's traffic. Adding vector search alone does not establish a revenue gain.

Incomplete or contradictory catalog data. A model cannot reliably resolve whether a title or specification table is correct. Define authoritative fields and repair missing variant attributes. Avoid combining contradictory values into one embedding and expecting similarity to settle the conflict.

Relatedness without suitability. A general model may place cameras, camera bags, and camera repair manuals close together. Evaluate distinctions that matter in the catalog, including complements, substitutes, and exact variants. If adaptation is needed, use realistic confusing examples rather than only obviously unrelated negatives.

Filtering and freshness. Filtering only after nearest-neighbor retrieval can leave too few eligible results, even when eligible products exist elsewhere in the index. Elastic's filtered kNN documentation explains this behavior and the performance trade-offs of filtering during approximate search. Test selective constraints with realistic stock and category distributions. Separately monitor how long updates take to reach the search experience.

Biased feedback. Clicks reflect exposure as well as relevance. Products placed higher have more opportunity to receive interactions, so retraining directly on clicks can reinforce previous rankings. Research on counterfactual learning to rank addresses this presentation bias. Maintain human judgments and deliberate evaluation slices alongside behavioral signals.

These failures need different remedies. Improving embeddings will not repair a stale price feed, and adding more candidates will not correct a misunderstood compatibility requirement.

How to measure semantic product search performance

Measure the stages separately before relying on an aggregate business result. Use a held-out query set with relevance judgments, then examine results by category, language, query frequency, and query type.

MeasurementWhat it tells you
Candidate recall@kThe fraction of all judged relevant products retrieved in the top k candidates
nDCG@kWhether highly relevant products appear early in the final ranking
Exact-item successWhether a requested SKU or model is returned in the intended position
Constraint violation rateHow often displayed results fail an explicit price, variant, or compatibility requirement
Zero-result and reformulation ratesWhere shoppers may struggle, interpreted alongside catalog coverage and session outcomes
Latency and freshnessWhether responses arrive within the serving budget and reflect sufficiently recent catalog facts

Normalized discounted cumulative gain, or nDCG, compares a ranking's discounted relevance gain with an ideal ordering; the scikit-learn documentation provides a reference implementation. Define relevance grades consistently, and do not assume every unjudged product is irrelevant.

Keep approximate-neighbor recall separate from relevance recall. The former compares an approximate index with exact nearest neighbors under the same vectors and filters. It measures index fidelity, not whether those neighbors satisfy shoppers.

For online evaluation, run a controlled A/B test with a predefined primary outcome, such as purchases per search session. Track latency, abandonment, cancellations, and returns as guardrails. Monitor tail latency and cost per query, including reranking. A ranking change that increases clicks but also increases incompatible purchases needs investigation, even if its offline score improves.

Conclusion

Semantic product search helps connect shopping intent with catalog descriptions. A useful implementation combines that capability with exact identifiers, variant-level constraints, current commerce facts, and evaluation tied to the requested task. Start from measurable retrieval quality, then add the components that address observed failures.

Try the forever-free PuppyGraph Developer Edition and book a demo with the team to see how openCypher and Gremlin queries follow product relationships across warehouse and lakehouse tables, with no graph-specific ETL, to check nested kit requirements alongside semantic retrieval.

Hao Wu

Hao Wu

Software Engineer

Hao Wu is a Software Engineer with a strong foundation in computer science and algorithms. He earned his Bachelor’s degree in Computer Science from Fudan University and a Master’s degree from George Washington University, where he focused on graph databases.
Free downloadBook demo

Keep learning

  • Databricks Architecture: Components, Layers & Guide

    Databricks deployment choices depend on the boundaries between coordination, compute, and persistent storage. Understanding those boundaries helps explain where a workload runs, which systems authorize access, and what remains when its compute stops. It also makes deployment decisions more concrete: selecting serverless compute, choosing a table's storage location, and organizing bronze, silver, and gold datasets solve different problems.

    Hao Wu

  • AWS Iceberg: Architecture, Features & Setup Guide

    Running Apache Iceberg on AWS lets several analytics engines work with shared tables in object storage. The important design decisions concern who commits changes, which features every reader supports, and who maintains the files. Those decisions determine whether an Athena dashboard and an EMR processing job can safely share the same dataset.

    Hao Wu

  • Data Lakehouse

    Marketing Data Lake: Benefits, Architecture & Use Cases

    Learn what a marketing data lake is, how it works, its key benefits, architecture, and use cases for marketing analytics and customer insights.

    Hao Wu

See all articles

Start free. Pay when it goes to production.

Contact us for any questions about capabilities, sizing and support.

* No payment required to start either one.

$ docker run -p 8081:8081 \
  -p 8182:8182 -p 7687:7687 \
  puppygraph/puppygraph:latestPulling puppygraph/puppygraph:latestStarting PuppyGraphWeb console listening on 0.0.0.0:8081Gremlin endpoint listening on 0.0.0.0:8182PuppyGraph is running# no pipelines · no second database · no data movement