Design similarity search as a set of named business relations, not as one generic nearest-neighbor query. A part can be visually similar, functionally related, bought together, or a qualified substitute, and those answers require different data and different risk controls. For any result that could influence sourcing or replacement, compatibility comes before similarity: reject impossible candidates using explicit engineering and policy constraints, then rank the remaining candidates with structured, lexical, vector, geometry, and graph evidence.
Do not begin with a pure embedding search or assume that a knowledge graph and GraphRAG will establish interchangeability. Text and image embeddings can retrieve things that look or sound alike while missing a thread pitch, tolerance, material, seal, voltage, load rating, certification, or mating interface. A candidate that fails a mandatory constraint should never be promoted as a substitute, even when it is the closest vector match. Unknown is not compatible when the cost of a wrong substitution is meaningful.
Start with a canonical product record, unit normalization, taxonomy, aliases, provenance, and a small rules engine. Build an auditable baseline using exact part-number lookup, lexical retrieval, and structured filters. Add hybrid retrieval for discovery, graph edges for explicit associations, and learned or CAD-based ranking only after you have labeled positives and hard negatives. The practical rule is filter first, then rank, with confidence labels and human review for low-confidence or safety-critical recommendations.
Decide what similar means before choosing a model
The most important design decision is the result type. A user who needs a replacement bearing is making a very different decision from a visitor browsing for parts that look alike. If the interface returns both without clear labels, it encourages an unsafe inference that every related result is interchangeable.
| Result type | Business question | Minimum evidence | How the interface should label it |
|---|---|---|---|
| Exact identity or duplicate | Is this the same sellable item under another supplier SKU or catalog page? | Manufacturer part number, authorized cross-reference, GTIN where applicable, supplier identity, and record provenance | Same item or duplicate listing |
| Interchangeable replacement | Can this item replace the query part in the stated application without changing the design? | Explicit approved substitution, complete required attributes, interfaces, tolerances, ratings, material, regulatory or customer requirements, and lifecycle conditions | Approved replacement, only with an evidence link |
| Functionally similar | Does it perform a comparable function but require engineering assessment? | Product family, functional attributes, use conditions, and known differences | Functionally similar, review requirements |
| Visually or geometrically similar | Does it look similar or have comparable shape? | Image, drawing, CAD descriptor, and a matching category | Visually similar, not a compatibility claim |
| Associated or purchased together | Is it an accessory, consumable, mating part, or frequently co-ordered item? | Bill of materials, approved accessory relation, service manual, compatible-equipment relation, or transaction evidence | Related accessory or commonly paired item |
| Useful procurement alternative | Can it meet a specified need under a declared selection policy? | Requirement profile, approved vendors, availability, price or lead time rules, and a review path | Candidate alternative, verify before use |
These meanings can share storage and retrieval infrastructure, but they should have separate endpoints or an explicit intent parameter. For example, intent=visual_discovery may use image similarity broadly. intent=interchangeable_replacement should call the compatibility rules first and return no recommendation when the evidence is incomplete. A taxonomy such as UNSPSC or GS1 Global Product Classification can organize catalog families, but it does not prove that two items mate, fit, or satisfy a design requirement.
For safety, regulated, load-bearing, pressure, electrical, medical, aerospace, or customer-controlled parts, do not let search results authorize a substitution. A qualified engineer, the manufacturer's approved cross-reference, the controlled drawing, or the applicable quality process remains the authority. Search can produce a reviewable candidate set and its evidence.
Build a canonical product record before building embeddings
Most industrial catalogs are not ready for ranking as-is. The same item can appear under a distributor number, a manufacturer part number, a legacy code, an abbreviated description, and several formatted variants. A score cannot repair an ambiguous identity or a dimension stored without its unit.
Create a canonical record for each physical or sellable part, while retaining each supplier listing as a source record. The canonical record should point back to every input and capture when the data was obtained. ISO 8000 addresses the characteristics and measurement of information and data quality, which is a useful framing for this work. ISO 8000-8 overview
| Data layer | Store | Why it matters for similarity |
|---|---|---|
| Source record | Supplier page or feed identifier, raw title and description, source URL, source revision, extraction time, document hash, and attached files | Preserves provenance, enables reprocessing, and lets a reviewer inspect the original claim. |
| Identity and aliases | Manufacturer, manufacturer part number, supplier SKU, internal part number, legacy codes, normalized strings, and authorized equivalence links | Exact matching usually has higher precision than semantic search, and aliases prevent false misses. |
| Taxonomy | Internal family, external taxonomy code, parent and child categories, and product role | Limits candidate generation to a meaningful part family and supports browse paths. |
| Typed attributes | Attribute name, value, original unit, normalized unit, tolerance or range, test condition, source, confidence, and whether the field is required | Makes numeric comparisons, filters, and explanation possible. |
| Compatibility rules | Required mating standards, interfaces, thread system and pitch, dimensions, material restrictions, pressure, load, speed, temperature, electrical ratings, approvals, and exclusions | Separates safe eligibility from approximate similarity. |
| Engineering artifacts | CAD model reference, drawing revision, PMI or GD&T where available, images, datasheets, and installation documents | Adds geometry and drawing evidence that text alone cannot represent. |
| Relationships | Supersedes, approved substitute for, fits, mates with, accessory for, used in assembly, compatible with equipment, purchased with, and conflicts with | Represents explicit relationships with their direction, scope, authority, and revision. |
| Retrieval fields | Normalized title, aliases, controlled attribute text, description, image embedding, text embedding, geometry descriptor, and graph features | Supports several candidate generators without overwriting engineering data. |
Store a quantity as more than a number. A useful representation for a nominal outside diameter is quantity=outside_diameter, value=52, unit=mm, lower_limit=51.98, upper_limit=52.02, condition=at 20 C, and source=drawing revision C, if those facts are available. Retain the source value as well as the normalized value. NIST describes a quantity value as a number multiplied by a unit, and its SI guidance provides a sound basis for normalizing values without discarding their meaning. NIST Guide to SI values of quantities
Tolerances, datum references, and geometric requirements are not decoration around a nominal dimension. ASME Y14.5 describes the rules for stating and interpreting GD&T and relates them to form, fit, function, and interchangeability. Treat controlled drawings and revisions as primary evidence when they exist. ASME Y14.5 Dimensioning and Tolerancing
For CAD exchange, preserve the original model and its revision, then derive descriptors separately. The ISO 10303 family, commonly called STEP, is intended for computer-interpretable product information and product-data exchange. A geometry embedding or shape signature can help find near shapes, but it must be linked back to the source CAD or drawing so a reviewer can inspect what it represents. ISO 10303-1 overview
Put mandatory compatibility checks before ranking
The retrieval pipeline should have an eligibility stage and a ranking stage. Eligibility answers, “May this candidate be considered for this intent?” Ranking answers, “Among the eligible candidates, which evidence is strongest?” Combining both into one opaque score makes it too easy for a close text or image match to outweigh a disqualifying engineering condition.
For an interchangeable replacement, typical hard filters include:
- Correct product family and intended function.
- Required interfaces and mating standard, such as thread system, pitch, connector keying, mounting pattern, shaft and housing fit, flange, or port type.
- Critical dimensions and their permitted ranges or tolerance scheme.
- Required material, surface treatment, environmental rating, load, speed, pressure, electrical, temperature, cleanliness, certification, and customer restrictions.
- Approved manufacturer, lifecycle, geographic, contract, or regulatory constraints where the business process requires them.
- No explicit conflict, obsolete restriction, or application-specific exclusion.
Some of these conditions may be conditional rather than universal. A seal material might be mandatory only for a particular chemical environment. Model this as a rule with a declared context, not a universal attribute weight. Keep the result of each rule as pass, fail, or unknown, with its evidence and rule version. For a high-risk intent, unknown should block the automatic recommendation. For lower-risk discovery, it can be shown as an information gap.
This is why a pure embedding system is dangerous as a substitute engine. Dense-vector similarity is a mathematical closeness measure, not an engineering compatibility proof. Vector indexes can efficiently retrieve nearest neighbors, but their own documentation describes the operation as distance or similarity among vectors and notes explicit accuracy, speed, and memory trade-offs. Faiss documentation The semantic signal can be useful after hard filters, but it cannot decide whether an M10 x 1.5 fastener is a replacement for an M10 x 1.25 fastener, or whether a bearing with the same envelope dimensions has the necessary clearance, sealing, load, and approval.
Use several retrieval signals for different kinds of evidence
No one method is sufficient. The right design is usually a hybrid pipeline that generates candidates with multiple methods, applies intent-specific eligibility rules, then reranks with explainable features. At a catalog size of roughly 10,000 pages, an exhaustive baseline and clear data work often deliver more value than an early move to a complex graph-retrieval stack.
| Method | Best use | Main strength | Main failure mode | Place in the pipeline |
|---|---|---|---|---|
| Exact and lexical retrieval | Part numbers, aliases, standards, controlled terms, titles, and drawing text | Precise for identifiers and rare technical tokens | Misses synonyms, abbreviations, and paraphrase | First candidate generator and identity resolution |
| Structured attribute matching | Dimensions, units, tolerances, material, ratings, taxonomy, and availability | Enforces business and engineering conditions | Fails when attributes are absent or extracted incorrectly | Mandatory filter and interpretable rank feature |
| Text vector retrieval | Descriptions, datasheets, maintenance notes, and multilingual paraphrase | Recovers conceptually related records without exact wording | May ignore a critical numeric or negated requirement | Candidate generator or modest reranking signal |
| Image retrieval | Product browsing when appearance has value | Helps with visual discovery and poor text | Confuses variants that differ in hidden or small details | Visual-only intent or low-weight discovery signal |
| CAD or drawing geometry retrieval | Shape family, mounting envelope, hole pattern, and design reuse | Uses engineering geometry rather than marketing text | Similar shape does not establish material, tolerance, or operating compatibility | Candidate generator with drawing review |
| Knowledge graph traversal | Approved replacements, assemblies, mating parts, accessories, and equipment fitment | Preserves explicit, auditable relations | Sparse or incorrectly extracted edges can mislead | Association retrieval and rules evidence |
| Metric learning | Domain-specific similarity learned from trusted labels | Can improve ranking across text, images, and attributes | Learns label bias and needs difficult counterexamples | Later-stage reranker, never a sole safety gate |
| Hybrid rank fusion | Queries that need exact matches and semantic recall | Combines complementary candidate lists | Can conceal weak source data if not evaluated by intent | Candidate union before constraint-aware reranking |
Hybrid retrieval is a normal engineering choice, not a vendor requirement. For example, Elastic's documentation describes hybrid search as combining full-text and vector search and recommends reciprocal rank fusion to merge ranked lists. Elastic hybrid search documentation You can implement the same pattern with other search infrastructure or a simple service at this scale. The essential point is that each contributing list is traceable and that filtering is enforced before a result can be labeled as a substitute.
A graph database is useful when the relationship itself is the answer. supersedes, fits_equipment, requires_accessory, and approved_for_application are more valuable as typed, versioned edges than as prose inferred anew at query time. ISO 10303 includes a product-relationship application module, which illustrates that relationships are part of product data rather than merely an LLM output. ISO 10303 product relationship module
Do not make GraphRAG the first compatibility system. It can retrieve documents or graph neighborhoods that help an engineer understand a result, but generative synthesis can omit a qualifier or blur the distinction between an approved relation and a plausible association. Use an LLM, if one is approved, for bounded extraction, normalization suggestions, query expansion, or explanation drafts. Require schemas, source spans or document references, validation rules, and review for critical fields. Use deterministic parsers for known part-number formats, units, thread notation, standard designations, and controlled attribute values wherever possible.
A bearing example with eligibility, ranking, and explanation
Example
This is an illustrative example, not an approved bearing-selection rule. A user views an internal part BRG-2505215-C3. Its controlled record says it is a single-row deep-groove bearing with a 25 mm bore, 52 mm outside diameter, 15 mm width, a specified radial-clearance class, sealed construction, minimum dynamic-load requirement, maximum operating speed, and an approved application list. The user chooses “find interchangeable replacement,” not “find visually similar.”
The service first resolves aliases and manufacturer part numbers. It creates a candidate pool from exact identifiers, same-family structured search, manufacturer-approved supersession links, lexical search over datasheets, and a low-weight vector search over descriptions. It then rejects candidates whose bore, outside diameter, width, bearing type, clearance, seal, load, speed, approval, or application rule fails. It also rejects records with unknown values for any attribute declared mandatory by the application. A candidate with nearly identical title text but a different clearance class is not allowed through merely because its description embedding is close.
The eligible candidates are reranked with an intentionally inspectable score. One possible initial formula is 0.40 approved-substitution evidence + 0.25 required-attribute agreement + 0.15 manufacturer and identifier evidence + 0.10 drawing or CAD agreement + 0.10 description agreement. The numeric weights are an illustration, not a universal recipe. Display the factors, the source documents, any inferred fields, and every satisfied rule. The top result can say “Approved replacement for this application, drawing revision C, 10 of 10 required conditions verified.” A lower result can say “Same envelope dimensions, clearance unknown, do not substitute automatically.” The takeaway is that ranking chooses among eligible evidence, while the rules engine protects against a believable but unsuitable neighbor.
For a fastener query, the corresponding hard fields could include thread designation, pitch, diameter, length, head style, drive, material, property class, coating, standard, washer or nut requirements, and the joint's environmental or corrosion conditions. Image similarity may help a user find an unfamiliar head style. It should not decide equivalence between similar-looking threads or strength classes.
Handle gaps, duplicates, aliases, and new products explicitly
Cold start is normal for a new part or a catalog with no click history. Start from content and records: normalized attributes, taxonomic family, identifiers, description, CAD or images, and approved relationships. Do not wait for behavioral data to build an initial system. Behavioral signals, if available, should be a later feature and should be separated by meaning. Co-purchase is evidence for an association, not proof of substitution.
Missing attributes deserve their own state. Do not convert missing diameter to zero, an absent tolerance to an exact nominal, or an unknown material to a generic material class. Track whether a value was supplied by the manufacturer, parsed from a controlled document, inferred by a model, estimated from an image, or entered by a user. For high-risk intents, only verified values should satisfy a hard rule.
Duplicate resolution should be conservative. Begin with exact manufacturer-part-number and authorized supplier cross-reference matches. Add normalized variants that remove harmless punctuation, spacing, and casing only after preserving the original identifier. Use a review queue for near matches, especially where a short suffix encodes a material, tolerance, coating, revision, connector, or package variant. Keep manufacturer names in an alias table with a canonical ID, evidence, effective dates, and owner. Never silently merge two records because their titles, images, or embeddings are similar.
Treat taxonomies as controlled navigation, not a replacement for a compatibility ontology. A taxonomy gives broad family membership. A compatibility model needs typed predicates and context, such as fits equipment model, requires adapter, approved substitute for, not for food-contact use, or compatible only above temperature X. Each relationship needs direction, source, scope, revision, and expiry or review date where applicable.
Learn ranking only from evidence that matches the intended meaning
Metric learning can be worthwhile after the rule-based baseline reveals where it misses good candidates. Train on labels that carry the desired relation, not on every item a user happened to click.
Good positive pairs include manufacturer-declared supersessions, engineer-approved substitutes in the same application context, controlled duplicate mappings, and verified compatible-mating relations. They must be labeled by relation type. purchased_with is not a positive example for interchangeable_with.
Hard negatives are especially valuable. They are pairs that look tempting to a retrieval system but must not be conflated, such as the same part family with a different thread pitch, a visually identical connector with a different keying, a bearing with the wrong clearance or sealing, a coated and uncoated fastener in a corrosive environment, or items from the same manufacturer description but different approval class. Deep metric-learning research commonly uses difficult negative examples because they expose distinctions that random pairs do not. Hardness-Aware Deep Metric Learning
Keep the label's authority, application context, and date. Split offline evaluation by manufacturer family, part family, and time period where practical, so the model is not rewarded merely for memorizing near-duplicate catalog records. If the model is trained on a supplier's cross-reference table, test it on different suppliers or later revisions. A learned score should be one reranking input after eligibility filters, not a substitute for a qualification rule.
Evaluate retrieval quality and substitution risk separately
Build a held-out evaluation set with expert or controlled-document judgments for each intent. Label a query-candidate pair with a graded outcome such as exact identity, approved replacement, functionally similar but review needed, visually similar only, or incorrect. Preserve the evidence used to judge it. Information-retrieval practice uses measures such as precision, recall, average precision, and nDCG; NIST's TREC documentation defines precision and recall at cutoffs and explains their trade-off. NIST TREC evaluation overview
| Question | Offline measure | Why it matters |
|---|---|---|
| Are the first few discovery results useful? | Precision@5 or nDCG@5, with graded labels by intent | The user often sees only a short list, and a graded metric can reward an approved substitute above a merely related part. |
| Can the system find approved alternatives when they exist? | Recall@K for approved replacements | A high-precision system is not useful if it hides valid approved choices. |
| Does a substitute result violate a mandatory rule? | Constraint-violation rate, target zero for automatic substitute labels | This is a safety gate, not a ranking-quality trade-off. |
| How costly are mistakes? | Cost-weighted false-substitution rate | A wrong recommendation for a low-cost catalog item is not equivalent to a wrong recommendation for a critical component. |
| Are confidence labels honest? | Observed correctness by confidence bucket and coverage | A result labeled high confidence should be correct at a materially higher observed rate than a low-confidence result. |
| Is the catalog being understood correctly? | Attribute completeness, parse error rate, duplicate merge precision, and source freshness | Retrieval cannot be trusted if its inputs drift or lose provenance. |
Do not optimize only click-through rate. A visually attractive but incompatible result can attract clicks. For online evaluation, distinguish browse use from procurement or engineering decisions. Track, with appropriate privacy controls, such outcomes as result opening, evidence inspection, request-for-quote creation, engineer acceptance of a reviewed alternative, correction or rejection reason, return or service incident where relevant, and time to find a verified part. Compare candidates in a limited pilot and do not silently expose unreviewed automatic-substitution labels for critical classes.
Confidence should combine evidence coverage and model behavior, not merely a raw similarity score. A clear approach is to reserve the high-confidence label for candidates with approved relationship evidence and all required attributes verified. For candidates without that evidence, use labels such as “possible functional match” or “needs engineering review,” show the missing fields, and provide an escalation path. Low confidence is a valid output. An empty result is safer than inventing a substitute.
Implement in increments that preserve auditability
Define intents and risk classes. List the result types, the user roles, the cost of a false result, and the allowed labels. Start with low-risk discovery and explicit associated-parts use cases if substitution evidence is scarce.
Create the canonical schema and provenance contract. Keep raw source records, part identities, aliases, attributes with units and tolerances, document revisions, and typed relationships. Select a small family such as bearings or fasteners for the first data-quality pass.
Ship an auditable baseline. Use exact identifier matching, aliases, taxonomy filtering, structured attribute comparisons, and lexical search over titles and documents. Show why each result was retrieved and which information is missing.
Add explicit relationships. Ingest manufacturer supersessions, assemblies, accessories, equipment fitment, and approved substitution tables as typed edges with source and date. A graph store is optional at this stage. A relational table can represent the same facts until traversal patterns justify a graph database.
Add hybrid retrieval for discovery. Combine lexical and vector candidates, then apply intent-specific filters and an explainable reranker. Test any image or geometry signal as a separate source rather than letting it redefine compatibility.
Collect review labels and hard negatives. Give reviewers an efficient way to accept, reject, or classify candidates and state why. Feed corrected aliases, attributes, and relationships back into the canonical store before training a learned ranker.
Introduce learned ranking cautiously. Evaluate against the frozen baseline by product family and risk class. Deploy first to a review queue or visually similar results. Promote it to more consequential ranking only when it improves the relevant metrics without increasing constraint violations.
Operate the system as product data, not a one-time model. Reprocess changed catalogs, version rules and models, monitor missing critical attributes, review unexpected rejection patterns, and make every result reproducible from its query, candidate set, rule version, features, and source evidence.
Failure modes to avoid
| Failure mode | Why it fails | Better design |
|---|---|---|
| One universal similarity score | It collapses identity, compatibility, visual resemblance, and association into one ambiguous number. | Require an intent and return relation-specific labels. |
| Embedding search used as substitute approval | Similar language or appearance can overwhelm a hidden incompatibility. | Enforce hard filters and require approved or complete evidence for automatic substitution. |
| LLM extraction accepted without evidence | It can normalize the wrong unit, miss a negation, or invent a relationship. | Retain source spans or document references, validate schemas, and review critical fields. |
| Missing values treated as a match | It creates false certainty and unsafe recommendations. | Use pass, fail, and unknown states with conservative gates. |
| Co-purchase data used as interchangeability labels | Accessories and consumables are often bought with, not instead of, a part. | Store association and substitution as separate relation types. |
| Duplicate catalogs merged on title similarity | Variant suffixes and supplier naming conventions can encode essential differences. | Use governed identity matching, alias evidence, and human review for uncertain merges. |
| Success measured only by clicks | A click says little about fitness, safety, or completed selection. | Measure expert acceptance, rule violations, correction reasons, and task completion by intent. |
| GraphRAG introduced before data governance | Generated answers can hide uncertain edge provenance and make debugging difficult. | Establish typed, versioned relationships first and use generation only as an evidence-grounded interface layer. |
Evidence
Sources used for this answer.
Question signals show what people need. Primary documentation supports the answer. Both remain visible.
- 01How to design similarity search for mechanical productsAI Stack Exchange · question signal · checked 1 Sept 2026
- 02UNSPSCundp.org · primary evidence · checked 1 Sept 2026
- 03GS1 Global Product Classificationref.gs1.org · primary evidence · checked 1 Sept 2026
- 04ISO 8000-8 overviewiso.org · primary evidence · checked 1 Sept 2026
- 05NIST Guide to SI values of quantitiesnist.gov · primary evidence · checked 1 Sept 2026
- 06ASME Y14.5 Dimensioning and Tolerancingasme.org · primary evidence · checked 1 Sept 2026
- 07ISO 10303-1 overviewiso.org · primary evidence · checked 1 Sept 2026
- 08Faiss documentationfaiss.ai · primary evidence · checked 1 Sept 2026
- 09Elastic hybrid search documentationelastic.co · primary evidence · checked 1 Sept 2026
- 10ISO 10303 product relationship moduleiso.org · primary evidence · checked 1 Sept 2026
- 11Hardness-Aware Deep Metric Learningarxiv.org · primary evidence · checked 1 Sept 2026
- 12NIST TREC evaluation overviewtrec.nist.gov · primary evidence · checked 1 Sept 2026