Recommendations: ideas before you search, built serverless with Nami

Real-world systems
Recommendations
Nami, cloud architect
Nami
Thank you

You built the recommendations with me.

From a tap on oats to a shelf that feels chosen for you. You learned:

  • How every action is taken in through a stream and kept as a short summary per person.
  • How find, rank and filter narrow 50,000 items to a handful.
  • How embeddings and nearest-neighbour search find similar items quickly.
  • How popular-in-your-area lists make day one useful.
  • How a nightly workflow, a small test and a guardrail keep the model honest.
Next: notifications

    Read this story as text

    Recommendations: the story, written out

    People who bought milk also bought bread, for 50,000 items and a million people. Nami, a cloud architect, builds the AWS setup behind recommendations: Kinesis, DynamoDB, OpenSearch vector search, SageMaker, Step Functions and ElastiCache.

    1. The app suggests honey. You never searched for honey. How did it know?
    2. Fifty thousand items, a million people, and a model that must guess in milliseconds.
    3. Three goals for suggestions: Learn from what people do, soon after they do it. Suggest only what can reach you now. Be useful on day one, even for someone new.
    4. Stay for the brand new user. That one surprises people. Scroll.
    5. What a tap tells us. Nobody rates groceries. So we learn from taps: oats viewed, milk added, bananas bought twice. Small clues that add up. Where do taps go?
    6. Take in every action. Straight into a Kinesis stream, through API Gateway. Millions of tiny messages are easy if you do not think on arrival.
    7. Remember the recent past. A function keeps a short summary per person: the last twenty items in thirty days. Short means fast to read. Now, someone asks for ideas.
    8. Someone asks for ideas. Three moves: find, rank, filter. Find wide and cheap, rank carefully, so only a few. How do we find similar items among fifty thousand?
    9. Find similar things. Items become lists of numbers, so things bought together sit close. OpenSearch finds neighbours in milliseconds: fifty thousand becomes two hundred.
    10. Rank the short list. A model scores the two hundred: how likely are you to buy each, right now? The best twenty survive. Done? Not yet.
    11. Only what can reach you. A perfect pick that is out of stock is a bad pick. We check your store, and drop what you bought an hour ago. Now, the surprise.
    12. Day one for a new person. A new user has no history! So we show what is popular in their area, ready-made in memory. Day one still feels personal.
    13. Learn while you sleep. Every night a workflow trains a new model, tests it against the old one, and only swaps if it wins. But better, how?
    14. Is it really better? Five percent of users see the new model first, and we compare orders. If anything drops, we roll back on our own.
    15. Watch it age. Recommendations fail quietly: shelves fill, just worse. So I watch model age, click rate and fallback use. Quiet failure, loud number.
    16. The whole picture. That is one set of ideas, tap to shelf. Trace it yourself, or open the full diagram.

    More stories on Real-world systems