Writing
Notes by Igor Shalamov, an AI systems architect and founder of Shalamov.io, on the architecture of AI growth systems: referral and recommendation systems, AI-driven communication automation, semantic search and classification.
Recommendation System Design Interview: A Complete Answer in 6 Steps
. A six-step answer for a 45-minute interview, with a video feed as the example: agree on the goal, put numbers on scale, draw the pipeline, then data, evaluation and trade-offs.
Collaborative Filtering vs Content Based Filtering: When to Use Each
. Content based filtering shows a new item from its first minute but repeats itself. Collaborative filtering brings discovery but cannot see new items. Production systems combine both.
Two Tower Model Explained: Recommendation Retrieval at Scale
. Why a recommender cannot rank its whole catalogue, and how the two tower model solves candidate retrieval: separate user and item towers, a shared vector space, training on clicks with in-batch negati
How to Build a Referral Program That Brings Users Who Stay
. How to build a referral program as a system: attribution of every invitation, reward rules tied to retention, fraud checks before payout, targeting the right users at the right moment, and measuring K
How to Evaluate Recommendation Systems: Precision@K, nDCG and A/B Tests
. How to measure a personalized feed: a metric for each layer, Precision@K with a worked example, beyond-accuracy metrics, why offline gains disappear online, and how an A/B test with guardrails makes t
Semantic Search vs Keyword Search: How Embeddings Find Meaning
. Semantic search compares meaning instead of words: how embeddings, nearest-neighbour indexes, hybrid retrieval with BM25 and cross-encoder re-ranking work together, and how to evaluate them.
How to Build a Referral System That Works Like a Recommender
. How to design a referral system as a learned recommender: who should invite whom, how candidates are retrieved and ranked, and how to measure the result.
Uplift modeling explained: pay the referral bonus only where it changes behaviour
. A response model pays users who would invite anyway. Uplift modeling ranks users by how much the bonus changes their behaviour, and the uplift curve checks it.
News personalization with BERT and LSTM: one model for the article, one for the reader
. BERT encodes the article, an LSTM reads the user history in order, a ranking layer picks the top five. Precision@5 0.78, CTR 6.3% on MIND.
One pipeline for intent, sentiment and toxicity
. One shared text encoder, three small heads: one pass, consistent labels, cheap to extend; separate thresholds, because mistakes cost differently.
Telegram Mini Apps as a recommendation surface
. The entry link is a feature, the first screen must be personal, the invitation flow is one tap away.
How to measure personalization
. Precision@5, CTR, coverage, freshness. Optimise CTR alone and you get clickbait; precision alone and you get repetition.
Two-tower models for candidate retrieval
. One tower for the user, one for the item, the same vector space. Retrieval becomes nearest-neighbour search; a heavier ranker sees only the top candidates.
Content filtering is a pipeline, not a blocklist
. A blocklist checks words. A filtering pipeline checks language, spam, harmful categories and context, then decides with a confidence score.
Real-time news classification: speed against accuracy
. A larger model classifies better but answers later. A fast first pass, a heavier model for uncertain cases, thresholds that decide.
How a feedback system in a messenger works
. Intake, understanding, routing, generated reply, learning from every edit: the fifth step makes it a growth system.
Semantic news search: from keywords to embeddings
. Keyword search matches words, semantic search matches meaning. For news, the freshness of the index becomes the hard part.
A referral system is a recommender system
. Who invites, whom, and with which message: three ranking problems instead of an “invite a friend” button.
. The class of systems that help a product grow by learning from its users, and the three layers every such system has.
Subscribe: RSS feed. Research articles behind these notes: Research.