01 — The new-product problem

Content provides a first basis for comparison

Collaborative recommendation learns from user interactions such as clicks and purchases. A newly added product has few or none. Its image, name and description already provide information for finding related products.

The specification selects Jina CLIP v2 to convert text and images into vectors: lists of numbers comparable in a shared space. L2 normalization would give vectors a length of 1. Cosine distance would then compare their direction to retrieve related content.

02 — Planned computation

Only new or changed fields would be re-encoded

Processing would compare a fingerprint calculated from each field’s content with the fingerprint stored on the previous pass. A difference would identify changed content to re-encode. Products removed from the catalog would be deleted from the index.

Configuration would define required fields and what happens when a field is missing. For an unavailable image, it would need to specify, for example, whether recommendation can use the remaining text or must exclude the product.

03 — Combining content

Configuration would set weights for name, description and image

Each configuration would assign weights to name, description and image. Their vectors would be combined with those weights and normalized. Weighting could change without rerunning the model for unchanged fields.

Separate tables by model and field would retain each vector’s origin. Representations produced by two different models are not automatically comparable. When replacing a model version, the tables would therefore keep old and new representations separate.

04 — Neighbor retrieval

Approximate search involves a recall, speed and memory trade-off

The specification selects HNSW, a multilevel graph connecting products to retrieve nearby vectors without comparing the entire catalog. This search can miss some of the closest neighbors. It would exclude the query product and candidates beyond a configured distance threshold.

At 1,024 dimensions with 32-bit floats, one million products require roughly 4 GB of vectors before index overhead. Relevant-neighbor recall, response time and memory therefore need comparison at target volume. The specification describes these choices; evaluation still needs to establish their effectiveness.