Skip to content
← All patterns

commerce

More Like This

What else is like this item?

Recommendations with no embedding call on the read path.

The cheapest recommendation surface anyone can build. Read the item the visitor is looking at, take the vector already stored on it, and hand that straight back as the search vector. No model runs at request time, because the embedding was computed once when the item was written.

The model

Product

One product, carrying the vector of its description.

pk
PRODUCT#<productId>

Attributes: name (S), embedding (L)

Access patterns

  • GetItemRead the product being viewed

    One item by key, which is where the vector comes from.

  • SearchVectors · by-similarityProducts like it

    The nearest neighbours to the vector that item already carries.

Design notes

Ask for one more than you needmodelling

The item you searched with is in the index, and under COSINE it scores about zero against itself, so it always comes back first. Ask for TopK + 1 and drop it. Forgetting this ships a recommendation rail whose first suggestion is the page you are already on.

No search schema, no conditionmodelling

This index declares no SearchSchema, so there is no HASH to supply and a search needs no condition at all. That is the right shape when the whole table is one neighbourhood. Declare a HASH the moment you need results confined to a category or a tenant, because you cannot add one later.

Taught in the course

more-like-thisDynamoDB workbench
Ready to run
Explore an access patternSelect to load & run

One item by key, which is where the vector comes from.

Request
Execute against the local Dynoxide engine
ReturnedFiltered outChanged
PK(pk)
embedding
name
PRODUCT#p-tent-2p
[0.93, 0.09, 0.04, 0.02]L
Two-person backpacking tentS
PRODUCT#p-tent-4p
[0.89, 0.16, 0.06, 0.03]L
Four-person family tentS
PRODUCT#p-bag-winter
[0.78, 0.31, 0.11, 0.05]L
Winter sleeping bagS
PRODUCT#p-mug
[0.14, 0.91, 0.08, 0.04]L
Enamel camping mugS
PRODUCT#p-lamp
[0.06, 0.11, 0.95, 0.05]L
Desk lampS
Awaiting request
Your next query starts here.

Choose an access pattern above, or build your own request. See what comes back and what it costs.

Write transactions, streams, tags and TTL are among the operations this browser build leaves out. dynoxide's native build has them.