AI and LLMPersonalizationPerformance and Scale plans

Real-Time Recommendations

Personal recommendations in one round of reads. User features, similar items by vector and what is trending, minus what they have already seen.

signals, one server
4
seen items repeated
0
trending counts
Live
Step 1 of 6
Count what is trending

The Top-K list was created once with TOPK.RESERVE. Every view updates it, and items that fall out of the top are reported back.

Example sessionplaying
# Count what is trending
hotkv> TOPK.ADD trending:shoes sku:88 sku:17 sku:88
1) (nil)
2) (nil)
3) (nil)

An animated walkthrough with real HotKV commands and example replies. Click any step to jump to it.

The problem

A good recommendation blends who the user is, what is similar to what they liked, what is popular right now, and what they have already seen. Those signals usually live in four systems, and stitching them together at request time adds latency to every page.

How HotKV handles it

HotKV holds all four. The feature store has the user's profile, a vector index finds similar items, a Top-K structure tracks what is trending as events arrive, and a Bloom filter per user removes items they have already seen. The recommender reads all of it from one server in a few calls.

Step by step

What happens, command by command

  1. 01

    Count what is trending

    The Top-K list was created once with TOPK.RESERVE. Every view updates it, and items that fall out of the top are reported back.

    TOPK.ADD trending:shoes sku:88 sku:17 sku:88
  2. 02

    Load the user's features

    Profile and behaviour features for the ranking model, with their age.

    FEATURE.GET user_features user:42
  3. 03

    Find similar items

    The user's taste vector finds the nearest products.

    VSIM.SEARCH items 20 0.31 0.12 0.77 ...
  4. 04

    Drop what they have seen

    A Bloom filter per user answers "seen before?" for the whole candidate list in one call.

    BF.MEXISTS seen:user:42 sku:88 sku:5 sku:17
  5. 05

    Blend in what is hot

    The current top sellers join the candidates, and the ranking model orders the final list.

    TOPK.LIST trending:shoes WITHCOUNT
  6. 06

    Remember the impression

    Items shown are added to the user's filter so they are not repeated tomorrow.

    BF.MADD seen:user:42 sku:5 sku:17
Where it fits

Real-world scenarios

Retail and marketplaces

"You may also like" rows mix similar products with what is selling now, and never show the same item twice in a session.

Media and streaming

Home screens rank shows by taste vectors and live popularity, and skip titles the viewer has already finished.

News and content feeds

Articles are recommended by topic similarity while trending stories rise in real time.

Built in

What you get

Feature store

Typed features per user or item for low-latency reads at inference time.

FEATURE.GETFEATURE.BATCH

Similar items

Nearest neighbours from an HNSW vector index.

VSIM.SEARCH

Trending now

Top-K keeps the most frequent items in a stream of events.

TOPK.ADDTOPK.LIST

Seen filters

Bloom filters answer "seen before?" in constant memory per user.

BF.MADDBF.MEXISTS

Common questions

Can a Bloom filter be wrong?

It can occasionally say an item was seen when it was not, at an error rate you choose with BF.RESERVE. It never says an item was not seen when it was.

Where does the ranking model run?

In your own service. HotKV serves the features and candidates at low latency, and your model makes the final order.

Which plans include it?

The feature store is part of the Performance and Scale plans. Vector search, Top-K and Bloom filters work on every plan.

Related use cases

Try it on your own workload

HotKV speaks the Redis protocol, so you can point an existing client at it and run these same commands.