<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
 <channel>
  <title>Igor Shalamov — Writing</title>
  <link>https://igorshalamov.com/writing/</link>
  <atom:link href="https://igorshalamov.com/writing/feed.xml" rel="self" type="application/rss+xml"/>
  <description>Notes by Igor Shalamov, an AI systems architect, on the architecture of AI growth systems: referral and recommendation systems, AI-driven communication automation, semantic search and classification.</description>
  <language>en</language>
  <lastBuildDate>Sat, 21 Nov 2026 12:00:00 +0000</lastBuildDate>
  <image><url>https://igorshalamov.com/press-kit/igor-shalamov-160.jpg</url><title>Igor Shalamov — Writing</title><link>https://igorshalamov.com/writing/</link></image>
  <item>
   <title>Collaborative Filtering vs Content Based Filtering: When to Use Each</title>
   <link>https://igorshalamov.com/writing/collaborative-vs-content-based-filtering/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/collaborative-vs-content-based-filtering/</guid>
   <pubDate>Sat, 05 Dec 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>A new song is uploaded and nobody has played it yet. One kind of recommender will never show it to anyone. The other can recommend it in the first minute, and then keeps showing you more of the same. These are collaborative filtering and content based filtering, and the choice between them depends on the data your product has.</p>
<h2>Content based filtering: match the item itself</h2>
<p>Content based filtering looks at the items. Each song is described by its features: genre, tempo, instruments, even the lyrics. A user's taste is the average of the songs they liked, and the recommendations are the songs nearest to that point.</p>
<p>The strength is that an item needs no history. A new jazz song with zero plays sits close to a jazz listener's taste and enters the list straight away. The weakness is that the method only finds more of the same, and over time the user ends up in a filter bubble.</p>
<h2>Collaborative filtering: learn from other users</h2>
<p>Collaborative filtering ignores what the item is and looks only at who played what. In a small made-up example, Ana played songs A, B and C. Ben played the same three, plus song D. Their histories overlap, so Ben is Ana's nearest neighbour, and song D is recommended to Ana. Nobody described the song. The users did the work.</p>
<p>Modern systems learn these overlaps with matrix factorisation or neural embeddings. The weakness is cold start: a new song has no plays, so it is invisible, and the same goes for a new user.</p>
<h2>Head to head</h2>
<ul>
<li><strong>Data needed.</strong> Collaborative filtering needs interaction history. Content based filtering needs good item features: text, tags, audio or images.</li>
<li><strong>Strength.</strong> Collaborative filtering finds things a user would never search for, because other people bridged the gap. Content based filtering works for a brand-new item from its first minute.</li>
<li><strong>Failure.</strong> Collaborative filtering fails on cold start, for new items and new users. Content based filtering fails by repeating itself.</li>
</ul>
<h2>When to use each</h2>
<p>Four questions settle most cases:</p>
<ol>
<li>Little interaction history but rich item data, as in a new marketplace? Start content based.</li>
<li>Millions of interactions? Collaborative filtering will usually win.</li>
<li>Should users discover things outside their usual taste? Collaborative again.</li>
<li>New items every day, as in news or video? You need both.</li>
</ol>
<p>The last case describes most production systems.</p>
<h2>How production systems combine them</h2>
<p>The common hybrid is a pipeline. Collaborative filtering supplies candidates from interaction history. Content based filtering fills the gap for new items and new users. A ranking model scores all candidates using both kinds of signal, and only the top 20 reach the feed.</p>
<p>The other option is one model: a <a href="https://igorshalamov.com/writing/two-tower-model-explained/">two tower model</a> with content features in the item tower. Either way, the hybrid gets discovery from users and cold start coverage from content.</p>
<h2>Measure coverage next to accuracy</h2>
<p>Accuracy alone will not tell you which approach your product needs. One useful extra number is catalogue coverage, the share of items that get recommended at all:</p>
<p><code>coverage = items ever recommended / all items</code></p>
<p>Take a made-up catalogue of 10,000 songs. Collaborative filtering recommends 3,100 of them, a coverage of 0.31. Content based filtering reaches 7,400, or 0.74. The hybrid reaches 8,200, or 0.82. Report coverage next to Recall@K, on a split by time; <a href="https://igorshalamov.com/writing/how-to-evaluate-recommendation-systems/">how to evaluate a recommender</a> covers the rest of the metrics.</p>
<h2>Three common mistakes</h2>
<ol>
<li><strong>Popular items take over.</strong> Collaborative filtering keeps pushing the same hits. Penalise popularity and track coverage.</li>
<li><strong>Thin item features.</strong> A title and a category are not enough for content based filtering. Use learned embeddings of the text, audio or images.</li>
<li><strong>Testing on a random split.</strong> A random train and test split leaks the future and flatters collaborative filtering. Split by time, the way production works.</li>
</ol>
<h2>The same choice in referral systems</h2>
<p>A <a href="https://igorshalamov.com/writing/referral-system-is-a-recommender-system/">referral system is a recommender system</a>, and it faces the same choice. Who a user should invite comes from what similar users did, which is collaborative, plus profile features, which are content. In an <a href="https://igorshalamov.com/writing/what-is-an-ai-growth-system/">AI growth system</a> both signals feed the models layer.</p>
<p>To recap: collaborative filtering learns from what people do, content based filtering learns from what the item is. Content wins on cold start. At scale, combine them.</p>
<h2>Related research</h2>
<p>The research behind this topic is my paper <a href="https://igorshalamov.com/research/news-personalization-ai/">Personalization of news content using AI: architecture and efficiency of neural network systems</a> (2025).</p>]]></content:encoded>
  </item>
  <item>
   <title>Recommendation System Design Interview: A Complete Answer in 6 Steps</title>
   <link>https://igorshalamov.com/writing/recommendation-system-design-interview/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/recommendation-system-design-interview/</guid>
   <pubDate>Sat, 05 Dec 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>The interviewer says: design the recommendations for a video app. You have 45 minutes, and most candidates start by drawing a model. That is the mistake that sinks the interview. Strong candidates follow a structure, and this one has six steps, about five to seven minutes each:</p>
<ol>
<li><strong>Goal</strong>: the metric and the users.</li>
<li><strong>Scale</strong>: requests per second and catalogue size.</li>
<li><strong>Design</strong>: retrieval, ranking and re-ranking.</li>
<li><strong>Data</strong>: features and labels.</li>
<li><strong>Evaluation</strong>: offline metrics, then an A/B test.</li>
<li><strong>Risks</strong>: where the design breaks, and the trade-offs.</li>
</ol>
<h2>Step 1: clarify the goal</h2>
<p>Never start designing before you agree on the goal. Ask three questions.</p>
<ul>
<li><strong>What are we optimising?</strong> Clicks are easy to game, so agree on watch time or long-term retention.</li>
<li><strong>Who are the users?</strong> If new users matter, cold start is part of the design.</li>
<li><strong>What are the constraints?</strong> For example, 200 milliseconds per request, and new videos every day.</li>
</ul>
<h2>Step 2: put numbers on it</h2>
<p>These are example numbers, so state your assumptions out loud.</p>
<ul>
<li>100 million daily users, 10 feed loads each: 1 billion requests a day.</li>
<li>1 billion divided by 86,400 seconds in a day: about 12,000 requests per second.</li>
<li>Peak traffic is around 3 times the average: about 35,000 requests per second.</li>
<li>10 million videos in the catalogue.</li>
</ul>
<p>These numbers decide the design: you cannot score 10 million videos 35,000 times a second.</p>
<h2>Step 3: retrieval, ranking, re-ranking</h2>
<p>Draw this diagram first. Everything else hangs on it.</p>
<ol>
<li><strong>Retrieval</strong> narrows 10 million videos to about 1,000, from several sources, such as a <a href="https://igorshalamov.com/writing/two-tower-model-explained/">two tower model</a> and fresh uploads.</li>
<li><strong>Ranking</strong> scores those 1,000 with a heavy model that predicts watch time and keeps about 100.</li>
<li><strong>Re-ranking</strong> applies the rules: diversity, freshness, no repeats.</li>
</ol>
<p>The feed shows the top 20. Explain why the stages exist: each stage is cheaper per item than the next, and the next one sees fewer items.</p>
<h2>Step 4: features and labels</h2>
<ul>
<li><strong>User features</strong>: watch history, language, device.</li>
<li><strong>Video features</strong>: topic, creator, age, and content embeddings.</li>
<li><strong>Context</strong>: time of day and network quality.</li>
</ul>
<p>The label: did the user watch more than half of the video? Clicks alone reward clickbait. Negatives are videos that were shown but skipped. Log features at serving time, so training sees exactly what production saw.</p>
<h2>Step 5: offline, then online</h2>
<p>Evaluate in two layers. Offline, measure Recall@K for retrieval and nDCG for ranking, on a split by time; <a href="https://igorshalamov.com/writing/how-to-evaluate-recommendation-systems/">how to evaluate recommendation systems</a> explains both. Online, run an A/B test, because offline gains often vanish in production.</p>
<p>In a made-up test, the control group on the current system watches 41 minutes a day. With the new ranker, it is 43. The two extra minutes are the headline. Also check the guardrails: user reports, creator diversity and latency.</p>
<h2>Step 6: risks and trade-offs</h2>
<p>Show that you know where the design breaks.</p>
<ul>
<li><strong>Cold start.</strong> New videos have no history. Add content features and a dedicated source for fresh uploads; the trade-off is covered in <a href="https://igorshalamov.com/writing/collaborative-vs-content-based-filtering/">collaborative vs content based filtering</a>.</li>
<li><strong>Feedback loops.</strong> The model only learns from what it showed, so popular videos get more popular. Reserve a small share of slots for exploration.</li>
<li><strong>Latency.</strong> The ranker blows the budget at peak. Cache results, precompute user vectors, or distil the ranker into a smaller one.</li>
</ul>
<h2>What interviewers score</h2>
<ul>
<li>You agreed on the goal before designing.</li>
<li>You used numbers to justify the architecture.</li>
<li>You split the problem into stages.</li>
<li>You knew offline metrics are not enough.</li>
</ul>
<h2>Beyond the interview</h2>
<p>The same six steps work for search, ads and referral systems. In a <a href="https://igorshalamov.com/writing/referral-system-is-a-recommender-system/">referral system</a>, the inviter is the query and possible invitees are the items. I use this structure when I design <a href="https://igorshalamov.com/writing/what-is-an-ai-growth-system/">AI growth systems</a>.</p>
<h2>Related research</h2>
<p>The research behind this topic is my paper <a href="https://igorshalamov.com/research/neural-architectures-referral-funnels/">Neural network architectures for automating user funnels in referral marketing</a> (2025).</p>]]></content:encoded>
  </item>
  <item>
   <title>Uplift modeling explained: pay the referral bonus only where it changes behaviour</title>
   <link>https://igorshalamov.com/writing/uplift-modeling-explained/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/uplift-modeling-explained/</guid>
   <pubDate>Mon, 30 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>A referral bonus sent to 100,000 users raises invitations. Many of those users would have invited friends anyway, and a model trained on who invites will tell you to pay them again next month. Uplift modeling asks a different question: for which users does the bonus change what they do?</p>
<h2>Four kinds of users</h2>
<ul>
<li><strong>Persuadables</strong> invite only if they get the bonus.</li>
<li><strong>Sure things</strong> invite anyway. For them, the bonus is a gift.</li>
<li><strong>Lost causes</strong> never invite, with or without it.</li>
<li><strong>Sleeping dogs</strong> react badly: a push for invitations makes them leave.</li>
</ul>
<p>Only persuadables are worth paying. A response model, also called a propensity model, ranks users by the chance they invite, so it puts sure things at the top and pays for invitations the product would get for free.</p>
<h2>Uplift is a difference</h2>
<p>For a user with features x:</p>
<p><code>uplift(x) = P(invite | bonus, x) − P(invite | no bonus, x)</code></p>
<p>You never observe both outcomes for the same person, so the estimate comes from a randomised test. In the illustrative example from the episode, 5 in 100 users in the control group invite without a bonus and 8 in 100 in the treatment group invite with it. The average uplift is 3 points. The model's job is to predict that difference for each user.</p>
<h2>Building it with two models</h2>
<p>The simplest approach, often called the T-learner, trains one model on the bonus group and one on the control group. Each predicts the chance a user invites. For a new user, run both and subtract: the bonus model's score minus the control model's score. Direct methods such as causal forests estimate the difference in one model and are the next step when the two-model estimate is too noisy.</p>
<h2>Checking it with the uplift curve</h2>
<p>Run a fresh randomised test and target 30% of users in three ways. In the episode's illustrative numbers, random targeting earns 10 extra invitations per 1,000 users, the top 30% by response score earns 6, and the top 30% by uplift earns 24. Repeat this for every cut-off and you get the uplift curve; the Qini curve is its common variant. The gap above random targeting is what the model is worth.</p>
<h2>Three ways uplift models lie</h2>
<ol>
<li><strong>Training on past campaigns</strong>, where someone chose who got the bonus. Train only on randomised tests and keep a random control group in every campaign.</li>
<li><strong>Ignoring sleeping dogs.</strong> If predicted uplift is below zero, send no offer at all.</li>
<li><strong>Judging by accuracy on the outcome.</strong> A model can predict invitations well and still rank uplift badly. Judge it by the uplift curve on new data.</li>
</ol>
<p>The same logic applies wherever an action costs money or attention: discounts and coupons, retention offers for users about to leave, and push notifications, where the cost is the user's patience.</p>
<h2>Where uplift fits</h2>
<p>Uplift targeting sits in the models layer of an <a href="https://igorshalamov.com/writing/what-is-an-ai-growth-system/">AI growth system</a>: once a referral system knows who is likely to invite, uplift decides whom to pay.</p>
<h2>Related research</h2>
<p>The research behind this topic is my paper <a href="https://igorshalamov.com/research/neural-architectures-referral-funnels/">Neural network architectures for automating user funnels in referral marketing</a> (2025).</p>]]></content:encoded>
  </item>
  <item>
   <title>Two Tower Model Explained: Recommendation Retrieval at Scale</title>
   <link>https://igorshalamov.com/writing/two-tower-model-explained/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/two-tower-model-explained/</guid>
   <pubDate>Sun, 29 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>You have 10 million items, and 50 milliseconds to choose what one user sees. Your best ranking model cannot score them all in time. Every large recommender hits this wall, and most solve it the same way. With a two tower model.</p>
<h2>Two stages</h2>
<p>Example numbers: a good ranking model needs about 10 microseconds per item. 10 million items times 10 microseconds is 100 seconds. The budget is 50 milliseconds, so we are 2,000 times too slow. So the work is split into two stages. Retrieval cheaply narrows 10 million items to about 1,000 candidates. Ranking scores those 1,000 with the heavy model, in 10 milliseconds. Only the top 20 reach the feed. Two towers are the standard design for retrieval.</p>
<h2>Two towers</h2>
<p>The model has two separate neural networks, called towers. The user tower starts from a learned embedding of the user ID. The item tower does the same for the item. The user side adds history: recent clicks, watches and purchases. The item side adds content: text, category and creator. Both sides add more: context for the user, age and popularity for the item. Each tower outputs a vector of the same size, say 64 numbers.</p>
<h2>Scoring</h2>
<p>Both towers write into one shared space. This is a two-dimensional sketch of it. The user vector lands somewhere in that space. The score of a user and an item is the dot product of their two vectors. Normalise both vectors, and the dot product becomes cosine similarity. Retrieval is then a nearest neighbour search around the user. The key constraint: the towers never see each other's inputs. That is why item vectors can be precomputed.</p>
<h2>Training</h2>
<p>Training data: pairs of a user and an item they clicked. For each user in a batch, the other users' clicks serve as negatives. These are in-batch negatives: no extra sampling needed. The loss pushes the clicked item up and the others down. One catch: popular items appear in many batches, so they are punished as negatives too often. The fix, sampling bias correction: subtract the log of each item's sampling probability.</p>
<h2>Serving</h2>
<p>The two towers run at different times. The item tower runs offline, in batch, over the whole catalogue. It produces one vector per item. Those vectors go into an approximate nearest neighbour index, for example HNSW. At request time, only the user tower runs: one forward pass, one vector. The index returns the top 1,000 items in a few milliseconds. Whenever the item tower changes, the index is rebuilt.</p>
<h2>Recall@K</h2>
<p>Retrieval has one job: do not lose the good items. The ranker never sees what retrieval dropped. So we measure Recall@K: the share of all relevant items that reach the top K. Here K = 1,000, the candidate list size. In a made-up example, one user clicks 20 items in the test week. A popularity baseline retrieves six of them: 0.3. Two towers with ID features only find eleven: 0.55. Add content features, and they find fifteen: 0.75. Always split by time: train on the past, test on the next week.</p>
<h2>Pitfalls</h2>
<p>First, cold start: a new item has no clicks, so its ID embedding is noise. Content features in the item tower give it a sensible vector from day one. Second, leakage: a feature computed after the click, like a total view count. Offline metrics look great, and production does not. Use point-in-time features. Third, version skew: the user tower is updated, but the index still holds old item vectors. The vectors stop sharing a space. Version both towers and the index together.</p>
<h2>Uses and recap</h2>
<p>The pattern appears wherever a catalogue is too large to rank. Video, music and news feeds. Products for a shopper. Documents for a search query. And referral systems: who should a user invite? There, the inviter is the query, and possible invitees are the items. That is the retrieval step of the referral system from our first video. To recap: two towers, one space, items indexed offline, users encoded online, checked with Recall@K.</p>
<p>It covers neural network architectures for referral funnels.</p>
<h2>Related research</h2>
<p>The research behind this topic is my paper <a href="https://igorshalamov.com/research/neural-architectures-referral-funnels/">Neural network architectures for automating user funnels in referral marketing</a> (2025).</p>
<h2>Video</h2>
<p>Watch the episode: <a href="https://youtu.be/ZJXA4Q7RtdQ">Two Tower Model Explained: Recommendation Retrieval at Scale</a></p>]]></content:encoded>
  </item>
  <item>
   <title>How to Build a Referral Program That Brings Users Who Stay</title>
   <link>https://igorshalamov.com/writing/how-to-build-a-referral-program/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/how-to-build-a-referral-program/</guid>
   <pubDate>Sat, 28 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>Your referral program brings sign-ups. Then they never pay. Some are fake accounts. The rest leave within a week. The reward is not the problem. The system around it is.</p>
<h2>Architecture</h2>
<p>A referral program is not a share button. It is a system with five parts. Attribution records who brought whom. Reward rules decide what each side gets, and for what. Fraud checks stop fake invitations before anyone is paid. Targeting chooses who to ask, and when. Measurement tells you whether any of it worked. And the results flow back: they retrain targeting and tune the rewards.</p>
<h2>Attribution</h2>
<p>Start with attribution, because every reward depends on it. Each inviter gets a unique link or code. Then set an attribution window: for example, the friend must sign up within 7 days of the click. The hard part is devices. The friend taps the link on a phone, then signs up on a laptop. So carry the code through the app install, or ask for it at sign-up. And when two people invited the same friend, one written rule decides who gets credit.</p>
<h2>Rewards</h2>
<p>Paying for a sign-up rewards empty accounts. Pay for a target action instead: a first purchase, or still being active on day 30. If only the inviter is paid, the friend has no reason to act. A two-sided reward gives both people something real. And cash for any invitation attracts people who farm rewards. Product value, like credits or extra plan time, with a cap per person, attracts people who use the product.</p>
<h2>Fraud</h2>
<p>Any reward worth having will be gamed. The simplest fraud is a self-invite: a second account for yourself. The signal: the same device or the same payment card on both sides. Then account farms: dozens of sign-ups from one source. The signal: many accounts behind one IP address. And bots that rush through the target action. The signal is velocity: too many steps, too fast. Combine the signals into a risk score, and hold the reward until the checks pass.</p>
<h2>Targeting</h2>
<p>Most programs ask everyone right after sign-up, before the user has seen any value. Ask after the aha moment, the first time the product delivers real value. Ranked by activity alone, the busiest users come first. A propensity model predicts something better: the chance that this user invites a friend who stays. Chloe is quiet, but her friends stay. She moves up to second. Ask the top users first, and cap how often anyone is asked.</p>
<h2>K-factor</h2>
<p>Now measurement. The classic number is the K-factor. It equals invitations per user, times the share of invitations that convert. In a made-up example, 100 users send 3 invitations each, and 10% convert. 3 × 0.1 gives a K-factor of 0.3. Now count only the invited users still active on day 30: 12 of them. The K-factor that matters is 0.12. Above one, growth feeds itself. Below one, referrals amplify your other channels, but do not replace them.</p>
<h2>Incrementality</h2>
<p>The K-factor has a blind spot: some invited friends would have joined anyway. So keep a holdout: a random group of users who never see the program. Compare them with everyone else, and count retained users, not sign-ups. These numbers are illustrative. If the gap is close to zero, you are paying rewards for users you would have had anyway.</p>
<h2>Mistakes</h2>
<p>Four mistakes show up again and again. Paying for sign-ups instead of users who stay. Paying rewards before the fraud checks are done. Asking for invitations before the user has seen any value. And trusting the K-factor without a holdout. Fix these four, and each part of the system starts to work for the next one.</p>
<h2>Recap</h2>
<p>To recap: attribute every invitation, reward the action that matters, and check for fraud before paying. Ask the right users after the aha moment, and judge the result against a holdout.</p>
<h2>Related research</h2>
<p>The research behind this topic is my paper <a href="https://igorshalamov.com/research/neural-architectures-referral-funnels/">Neural network architectures for automating user funnels in referral marketing</a> (2025).</p>
<h2>Video</h2>
<p>Watch the episode: <a href="https://youtu.be/PbHN5ZZMan4">How to Build a Referral Program That Brings Users Who Stay</a></p>]]></content:encoded>
  </item>
  <item>
   <title>How to Evaluate Recommendation Systems: Precision@K, nDCG and A/B Tests</title>
   <link>https://igorshalamov.com/writing/how-to-evaluate-recommendation-systems/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/how-to-evaluate-recommendation-systems/</guid>
   <pubDate>Thu, 26 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>A new ranking model wins every offline metric. It goes into an A/B test, and nothing changes. This happens more often than teams expect.</p>
<h2>Where metrics apply</h2>
<p>A personalized feed is built in layers, and each layer needs its own metric. Candidate generation narrows millions of items to a few hundred. We measure its recall. A ranking model orders them. We measure ranking quality. A re-ranking step adds diversity, freshness and business rules. Only then does the user see the feed, and there we measure outcomes. A good number for one layer says little about the next one.</p>
<h2>Precision@K</h2>
<p>Offline, we replay historical data. Precision@K is the share of relevant items among the top K recommendations. Take K = 5. In a made-up example, one reader later opened three stories we could have shown. A popularity baseline gets one of them into its top five: 0.2. The old model gets two: 0.4. The new model gets all three: 0.6. Always split by time: train on the past, test on the future, or every number is inflated.</p>
<h2>Beyond accuracy</h2>
<p>Accuracy is not the whole picture. Precision and recall at K count relevant items in the top K. Coverage shows how much of the catalogue is ever recommended. nDCG also rewards placing relevant items higher, because people rarely scroll far. Diversity measures how different the items in one feed are. But none of the accuracy metrics tells you that a feed has become boring. Novelty and calibration check that the feed goes beyond the obvious and matches the reader's real mix of interests.</p>
<h2>The offline-online gap</h2>
<p>So why do offline gains disappear? First, position bias: people click what is shown on top, so the logs favour the old ranking. Second, a feedback loop: the training data was produced by the previous model. Third, there is no data on items that were never shown. Inverse propensity scoring helps, but it does not remove the bias. Finally, a click is only a proxy for satisfaction. The feedback loop is the one most teams underestimate.</p>
<h2>Online test</h2>
<p>Offline evaluation is a filter. The A/B test makes the decision. Split real traffic between the old model and the new one. Then measure what matters: click-through rate, dwell time, and above all, whether readers come back. These numbers are illustrative. The difference in return rate is the result that counts.</p>
<h2>Recap</h2>
<p>To recap: measure each layer with its own metric, and look beyond accuracy. Split offline data by time, and treat offline results as a filter. Then let a well-guarded A/B test make the final call.</p>
<h2>Related research</h2>
<p>The research behind this topic is my paper <a href="https://igorshalamov.com/research/news-personalization-ai/">Personalization of news content using AI: architecture and efficiency of neural network systems</a> (2025).</p>
<h2>Video</h2>
<p>Watch the episode: <a href="https://youtu.be/eW9FAuHuYTI">How to Evaluate Recommendation Systems: Precision@K, nDCG and A/B Tests</a></p>]]></content:encoded>
  </item>
  <item>
   <title>How to Build a Referral System That Works Like a Recommender</title>
   <link>https://igorshalamov.com/writing/how-to-build-a-referral-system/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/how-to-build-a-referral-system/</guid>
   <pubDate>Wed, 25 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>Most referral programs are a reward table: invite a friend, get a bonus. But the reward is the easy part. The hard part is deciding who should invite whom. That is a ranking problem, and it makes a referral system a recommender system.</p>
<h2>The problem</h2>
<p>Take one user. Call her Ana. In this made-up example, Ana has eight contacts in the app. A static program sends the same invitation to all eight. Two of them join. Six people got a message they did not want. And realistically, Ana will message three people, not eight. So the real question is: which three should the system suggest?</p>
<h2>Architecture</h2>
<p>We start from a user graph: contacts, shared groups, interactions. From the graph we generate candidate pairs: an inviter and a possible invitee. A ranking model scores every pair. The best pairs become invitation suggestions. Now the key part: every accepted or ignored invitation becomes a training label. Without the loop, this is automation. With it, the system learns.</p>
<h2>Retrieval</h2>
<p>With eight contacts, we could score everyone. With millions of possible pairs we cannot, so retrieval comes first. A two-tower model maps the inviter and every candidate into one vector space. It is trained so that pairs with accepted invitations end up close together. Retrieval is then a nearest neighbour search around Ana. We keep the five nearest candidates.</p>
<h2>Ranking</h2>
<p>The ranking model scores these five pairs with richer features. Start with tie strength alone: how often and how recently two people talk. The top three would be Dev, Ben and Chloe. Now add invitee fit: the predicted chance that a new user stays active. The order changes: Fay moves up to second, and Dev drops out of the top three.</p>
<h2>Precision@K</h2>
<p>To check the ranking, we use Precision@K. It is the share of the top K suggestions that were accepted. Ana sends three invitations, so K = 3. In our made-up example, two of her eight contacts would accept. Three random picks give a precision of 0.25. Tie strength alone found one of the two: 0.33. The full model found both: 0.67. Same user, same three messages, over two and a half times the random baseline.</p>
<h2>Incremental lift</h2>
<p>One trap remains: some invited people would have joined anyway. So keep a holdout group with no model-driven suggestions. Compare it with the group that gets them, and count retained users, not acceptances. These numbers are illustrative. That difference is what the system actually earned.</p>
<h2>Pitfalls</h2>
<p>Three things go wrong in practice. First, the feedback loop is biased: the model only sees outcomes for pairs it chose. So keep a small slice of random suggestions. Second, optimising for acceptances rewards pressure. Optimise for retained users, and cap invitations per person. Third, contact data needs explicit consent. Without it, the feature stays off.</p>
<h2>Recap</h2>
<p>To recap: a referral system is a recommender over a user graph. Retrieve candidates, rank them, suggest the invitation, and learn from every outcome. Judge it by Precision@K, by retention, and by lift against a holdout.</p>
<h2>Related research</h2>
<p>The research behind this topic is my paper <a href="https://igorshalamov.com/research/neural-architectures-referral-funnels/">Neural network architectures for automating user funnels in referral marketing</a> (2025).</p>
<h2>Video</h2>
<p>Watch the episode: <a href="https://youtu.be/fzfCppUap7Y">How to Build a Referral System That Works Like a Recommender</a></p>]]></content:encoded>
  </item>
  <item>
   <title>Semantic Search vs Keyword Search: How Embeddings Find Meaning</title>
   <link>https://igorshalamov.com/writing/semantic-search-vs-keyword-search/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/semantic-search-vs-keyword-search/</guid>
   <pubDate>Wed, 25 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>A user types a question, and the best answer does not share a single word with it. Keyword search misses it. Semantic search finds it, because it compares meaning, not words.</p>
<h2>Vocabulary mismatch</h2>
<p>A reader searches for: central bank raises the cost of borrowing. The story that answers it says: interest rates go up by a quarter point. The two texts share almost no words. Keyword scoring counts overlapping terms, so this story ranks low. We need to compare meaning instead.</p>
<h2>Architecture</h2>
<p>Every document is encoded offline into a vector, called an embedding. At query time, the same encoder turns the question into a vector. An approximate nearest neighbour index, for example HNSW, returns the closest documents in milliseconds. Then a re-ranker reads the top candidates more carefully. And it produces the final order. Follow one query through the system. The index is fast but approximate. The re-ranker is slow but precise.</p>
<h2>Nearest neighbours</h2>
<p>Picture the embedding space as a map, where stories with similar meaning sit close together. This is a two-dimensional sketch. Real embeddings have hundreds of dimensions. The query lands on the same map. Search becomes a nearest neighbour lookup around it. We keep the five nearest stories, and none of them has to share a word with the query.</p>
<h2>Sparse vs dense</h2>
<p>Keyword search is not obsolete. It simply fails in different places. Sparse retrieval, such as BM25, is precise on exact terms: names, numbers, product codes. Dense retrieval captures meaning and paraphrases. Sparse needs no training. Dense needs a trained encoder. Sparse misses paraphrases, while dense can miss rare names and codes. Because their errors differ, the strongest systems combine both.</p>
<h2>Hybrid and re-ranking</h2>
<p>BM25 alone puts the story with the most matching words on top. Add dense retrieval and merge both lists, for example with reciprocal rank fusion. Then a cross-encoder reads the query and each story together, and scores them again. The rate hike story, which shared no words with the query, is now first. A cross-encoder is accurate but slow, so it only runs on the short list.</p>
<h2>Evaluation</h2>
<p>Evaluate each stage on its own. For retrieval, use Recall@K: the share of all relevant documents that reach the top K. Here K = 100, the size of the short list. In a made-up example, the query has ten relevant stories. Sparse retrieval alone finds six of them: 0.6. Dense retrieval alone finds seven: 0.7. The hybrid finds nine: 0.9. For the final order, add nDCG@10, and track latency at the 95th percentile.</p>
<h2>News search</h2>
<p>News adds four requirements. Freshness: relevance is blended with a time decay. Deduplication: many outlets publish near-identical stories, so results are clustered. Streaming: a new story must be searchable within seconds. And entities: names and places must stay exact, one more reason to keep sparse retrieval in the mix.</p>
<h2>Recap</h2>
<p>To recap: encode documents and queries into one vector space. Retrieve with a hybrid of sparse and dense search, then re-rank the short list. Measure recall for retrieval, nDCG for the final order, and latency for the user.</p>
<h2>Related research</h2>
<p>The research behind this topic is my paper <a href="https://igorshalamov.com/research/semantic-news-search-ai/">Semantic news search using artificial intelligence: technologies, problems and prospects</a> (2024).</p>
<h2>Video</h2>
<p>Watch the episode: <a href="https://youtu.be/x8RKXt7atjw">Semantic Search vs Keyword Search: How Embeddings Find Meaning</a></p>]]></content:encoded>
  </item>
  <item>
   <title>News personalization with BERT and LSTM: one model for the article, one for the reader</title>
   <link>https://igorshalamov.com/writing/news-personalization-bert-lstm/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/news-personalization-bert-lstm/</guid>
   <pubDate>Tue, 24 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>A news recommender has to read two things at once: the article and the reader's recent history. In my 2025 paper on <a href="https://igorshalamov.com/research/news-personalization-ai/">personalization of news content with AI</a> I gave each of them its own model.</p>
<h2>The setup</h2>
<ol>
<li><strong>BERT</strong> encodes the text of each article, so two stories about the same event end up close to each other even when they share few words.</li>
<li><strong>An LSTM</strong> reads the articles a user opened, in order. A reader who moved from sport to markets last week gets a different state from one who did it a year ago.</li>
<li><strong>A ranking layer</strong> scores candidate articles against that reader state and returns the top five.</li>
</ol>
<h2>Results</h2>
<p>The experiments used MIND, Microsoft's public news-recommendation dataset (Wu et al., ACL 2020). The hybrid reached Precision@5 of 0.78, Recall@5 of 0.75, F1 of 0.76 and a CTR of 6.3%. Against the TextCNN, LSTM, BERT-base and matrix-factorization baselines that is up to 43% higher F1 and 66% higher CTR. It also did better in cold-start cases, which fits the design: a new article can be ranked from its text before anyone has clicked it.</p>
<h2>The cost</h2>
<p>Running BERT on every new article is heavy for a live feed, and MIND is English-only, so multilingual news stays an open problem. The next step the paper names is a lighter model that keeps most of the gain. How to read these metrics together is covered in <a href="https://igorshalamov.com/writing/how-to-measure-personalization/">How to measure personalization</a>.</p>
<h2>Video</h2>
<p>Watch the episode: <a href="https://youtu.be/EkyC-8WAZ6g">Hybrid Recommendation System: BERT + LSTM News Recommender Explained</a></p>]]></content:encoded>
  </item>
  <item>
   <title>How a feedback system in a messenger works</title>
   <link>https://igorshalamov.com/writing/feedback-system-in-a-messenger/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/feedback-system-in-a-messenger/</guid>
   <pubDate>Sat, 21 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>Intake, understanding, routing, generated reply, learning from every edit: the fifth step makes it a growth system.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>At Appvillis UAB, the developer of the Nicegram messenger, I work as AI Software Architect on AI-driven feedback automation. Here is the general shape of such a system.</p>
<ol>
<li><strong>Intake</strong>: every message from a user lands in one queue, whatever the channel.</li>
<li><strong>Understanding</strong>: models classify the topic, the intent and the sentiment.</li>
<li><strong>Routing</strong>: simple cases get an answer at once; complex or emotional ones go to a person, with context attached.</li>
<li><strong>Reply</strong>: a generated draft that a person can send as is or edit.</li>
<li><strong>Learning</strong>: every edit and every escalation becomes training data.</li>
</ol>
<p>The fifth step is what turns automation into a <a href="https://igorshalamov.com/writing/what-is-an-ai-growth-system/">growth system</a>.</p>]]></content:encoded>
  </item>
  <item>
   <title>Real-time news classification: speed against accuracy</title>
   <link>https://igorshalamov.com/writing/real-time-news-classification-speed-vs-accuracy/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/real-time-news-classification-speed-vs-accuracy/</guid>
   <pubDate>Sat, 21 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>A larger model classifies better but answers later. A fast first pass, a heavier model for uncertain cases, thresholds that decide.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>My 2025 paper looks at <a href="https://igorshalamov.com/research/neural-news-classification-real-time/">neural networks for real-time news classification</a>. The central trade-off is easy to state and hard to tune.</p>
<p>A larger model classifies better but answers later. A news stream punishes lateness: a perfectly labelled story that arrives ten minutes late is worth less than a good label now.</p>
<h2>Common answers</h2>
<ul>
<li>A fast first-pass classifier, with a heavier model for uncertain cases only.</li>
<li>Distilled models that keep most of the accuracy at a fraction of the cost.</li>
<li>Confidence thresholds that decide when to wait for the second opinion.</li>
</ul>]]></content:encoded>
  </item>
  <item>
   <title>Content filtering is a pipeline, not a blocklist</title>
   <link>https://igorshalamov.com/writing/content-filtering-is-a-pipeline/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/content-filtering-is-a-pipeline/</guid>
   <pubDate>Sat, 21 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>A blocklist checks words. A filtering pipeline checks language, spam, harmful categories and context, then decides with a confidence score.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>Content filtering is part of my work at Appvillis UAB on the Nicegram messenger, and the main lesson is architectural.</p>
<p>A blocklist answers one question: does this text contain a forbidden word? A filtering pipeline answers several, in order:</p>
<ol>
<li>language and format;</li>
<li>spam and automation signals;</li>
<li>classification of harmful categories;</li>
<li>context: who sent it, where, in reply to what;</li>
<li>a decision with a confidence score, and a path for appeals.</li>
</ol>
<p>Each stage can be measured and improved on its own. That is what makes the system maintainable.</p>]]></content:encoded>
  </item>
  <item>
   <title>Two-tower models for candidate retrieval</title>
   <link>https://igorshalamov.com/writing/two-tower-models-candidate-retrieval/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/two-tower-models-candidate-retrieval/</guid>
   <pubDate>Sat, 21 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>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.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>A short note on a building block I use in recommendation and referral systems: the two-tower model.</p>
<p>One tower encodes the user, the other encodes the item (a post, a product, a person to invite). Both produce vectors in the same space. Retrieval becomes a nearest-neighbour search, which scales to millions of candidates.</p>
<h2>Why it matters for growth systems</h2>
<ul>
<li>Item vectors can be computed in advance.</li>
<li>The user vector updates with every action.</li>
<li>A heavier ranking model then needs to look only at the top few hundred candidates.</li>
</ul>
<p>Retrieval first, ranking second: most production recommenders follow this split.</p>]]></content:encoded>
  </item>
  <item>
   <title>How to measure personalization</title>
   <link>https://igorshalamov.com/writing/how-to-measure-personalization/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/how-to-measure-personalization/</guid>
   <pubDate>Sat, 21 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>Precision@5, CTR, coverage, freshness. Optimise CTR alone and you get clickbait; precision alone and you get repetition.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>My paper on <a href="https://igorshalamov.com/research/news-personalization-ai/">personalization of news content with AI</a> uses ranking metrics, and they deserve a plain explanation.</p>
<ul>
<li><strong>Precision@5</strong>: of the first five items shown, how many were relevant.</li>
<li><strong>CTR</strong>: the share of shown items that were opened.</li>
<li><strong>Coverage</strong>: how much of the catalogue the system ever recommends.</li>
<li><strong>Freshness</strong>: how old the recommended items are.</li>
</ul>
<p>A system tuned only for CTR drifts toward clickbait. A system tuned only for precision can become narrow and repetitive. Good personalization reports several metrics together and makes the trade-offs visible.</p>]]></content:encoded>
  </item>
  <item>
   <title>Telegram Mini Apps as a recommendation surface</title>
   <link>https://igorshalamov.com/writing/telegram-mini-apps-recommendation-surface/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/telegram-mini-apps-recommendation-surface/</guid>
   <pubDate>Sat, 21 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>The entry link is a feature, the first screen must be personal, the invitation flow is one tap away.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>Shalamov.io, which I founded, is a platform for referral funnels, Telegram services and Mini Apps with no-code AI modules.</p>
<p>A Mini App inside a messenger is an unusual place for recommendations: the user arrives from a chat, a channel or a friend's link, often with clear intent and very little patience.</p>
<h2>Design consequences</h2>
<ul>
<li>The entry point is a feature: the link a person came from tells you a lot.</li>
<li>The first screen must already be personalised.</li>
<li>The invitation flow lives one tap away, inside the same conversation.</li>
</ul>
<p>That makes the Mini App both a storefront and a <a href="https://igorshalamov.com/writing/referral-system-is-a-recommender-system/">referral surface</a>.</p>]]></content:encoded>
  </item>
  <item>
   <title>One pipeline for intent, sentiment and toxicity</title>
   <link>https://igorshalamov.com/writing/one-pipeline-intent-sentiment-toxicity/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/one-pipeline-intent-sentiment-toxicity/</guid>
   <pubDate>Sat, 21 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>One shared text encoder, three small heads: one pass, consistent labels, cheap to extend; separate thresholds, because mistakes cost differently.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>A pattern from AI communication automation: do not build three separate classifiers when one shared encoder will do.</p>
<p>Intent, sentiment and toxicity all read the same message. A shared text encoder with three small heads:</p>
<ul>
<li>runs one forward pass instead of three;</li>
<li>keeps the three labels consistent with each other;</li>
<li>lets new heads (language, urgency) be added cheaply.</li>
</ul>
<p>The heads still get separate thresholds and separate evaluation, because the cost of a mistake differs: a missed toxic message is not the same as a misread intent.</p>]]></content:encoded>
  </item>
  <item>
   <title>What is an AI growth system</title>
   <link>https://igorshalamov.com/writing/what-is-an-ai-growth-system/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/what-is-an-ai-growth-system/</guid>
   <pubDate>Fri, 20 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>The class of systems that help a product grow by learning from its users, and the three layers every such system has.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>An AI growth system is the class of systems that help a digital product grow by learning from its users: referral and recommendation systems, AI-driven communication automation, semantic search and classification.</p>
<h2>Three layers</h2>
<p>Every such system has three layers:</p>
<ol>
<li><strong>Behaviour data</strong>: what people open, share, ignore and reply to.</li>
<li><strong>Models</strong>: recommendation and ranking, classification of intent and sentiment.</li>
<li><strong>Communication</strong>: personal replies, invitations and content that reach the user at the right moment.</li>
</ol>
<h2>The feedback loop</h2>
<p>A feedback loop connects the layers. Every reply and every invitation becomes new data, and the models retrain on it. Without that loop you have automation. With it you have a growth system.</p>
<h2>Where this comes from</h2>
<p>Since April 2023 I have worked with Appvillis UAB, the developer of the Nicegram messenger, as AI Software Architect: AI-driven feedback automation, adaptive bots and content filtering. I also publish research on semantic news search, real-time neural news classification and personalization of news content.</p>
<p>The field as a whole, with the architecture of each layer and the research behind it, is described on the page <a href="https://igorshalamov.com/ai-growth-systems/">AI growth systems</a>. The next notes go through the layers one at a time.</p>]]></content:encoded>
  </item>
  <item>
   <title>A referral system is a recommender system</title>
   <link>https://igorshalamov.com/writing/referral-system-is-a-recommender-system/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/referral-system-is-a-recommender-system/</guid>
   <pubDate>Fri, 20 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>Who invites, whom, and with which message: three ranking problems instead of an “invite a friend” button.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>The first thing I tell teams about referral programs is this: a referral program is a recommender system in disguise.</p>
<p>It has to answer three questions for every user:</p>
<ol>
<li>Who is likely to invite someone right now?</li>
<li>Whom will they invite, and in which channel?</li>
<li>Which message and which reward will make that invitation land?</li>
</ol>
<p>Each question is a ranking problem. Treat referrals as a static “invite a friend” button and you leave all three to chance. Treat them as recommendations and you can learn from every invitation that was sent, opened or ignored.</p>
<h2>A referral funnel as an AI growth system</h2>
<p>Read this way, a referral funnel has the three layers of an <a href="https://igorshalamov.com/writing/what-is-an-ai-growth-system/">AI growth system</a>: invitations are the communication, their outcomes are the behaviour data, and the ranking models close the loop.</p>
<h2>What the research covers</h2>
<p>My paper <a href="https://igorshalamov.com/research/neural-architectures-referral-funnels/">Neural network architectures for automating user funnels in referral marketing</a> (Aktualnye issledovaniya, 2025) reviews the architectures used for this work: large language models, convolutional, recurrent and generative adversarial networks, and reinforcement learning models. They are applied to content generation, audience analysis, interaction with users and campaign optimisation. The paper also discusses the ethical, privacy and technical sides of putting neural networks into referral funnels.</p>]]></content:encoded>
  </item>
  <item>
   <title>Semantic news search: from keywords to embeddings</title>
   <link>https://igorshalamov.com/writing/semantic-news-search-keywords-to-embeddings/</link>
   <guid isPermaLink="true">https://igorshalamov.com/writing/semantic-news-search-keywords-to-embeddings/</guid>
   <pubDate>Fri, 20 Nov 2026 12:00:00 +0000</pubDate>
   <dc:creator>Igor Shalamov</dc:creator>
   <description>Keyword search matches words, semantic search matches meaning. For news, the freshness of the index becomes the hard part.</description>
   <content:encoded><![CDATA[<p><em>By Igor Shalamov, an AI systems architect and founder of Shalamov.io.</em></p><p>Keyword search finds documents that share words with the query. Semantic search finds documents that share meaning. The switch is simple to describe: encode queries and documents as vectors (embeddings) and retrieve by distance instead of by term overlap.</p>
<h2>What changes for news</h2>
<ul>
<li>Synonyms and paraphrases stop being a problem.</li>
<li>A story can be found before it has a fixed name.</li>
<li>The index must be refreshed as fast as the news itself, which makes freshness an architecture question, not a model question.</li>
</ul>
<h2>What the research covers</h2>
<p>My paper <a href="https://igorshalamov.com/research/semantic-news-search-ai/">Semantic news search using artificial intelligence: technologies, problems and prospects</a> (Aktualnye issledovaniya, 2024) reviews the technologies behind this switch: vector databases, hybrid and cascade approaches, contextual retrieval. It looks at the open problems, namely scalability, real-time processing, integration with media infrastructure and security, and at the directions that follow: agent-oriented interfaces, multimodal search, personalization and federated systems.</p>
<p>In an <a href="https://igorshalamov.com/writing/what-is-an-ai-growth-system/">AI growth system</a>, semantic search sits in the models layer: it decides what a reader sees next.</p>]]></content:encoded>
  </item>
 </channel>
</rss>
