Milvus 这个教程用具体数据对比指数、高斯、线性三种衰减对文章排名的效果,帮你选对函数。
Milvus 提供 Exponential、Gaussian、Linear 三种衰减函数用于重排序。Exponential 对新闻和社交适用,offset 3天时5天文章分数降至0.4774。Gaussian 用于平衡搜索,offset 7天时15天文章得0.3601,30天文章得0.0642。Linear 用于事件搜索,90天文章仍得0.3037,有明确截止点。用户需根据不同时效性需求选择对应函数。
Semantic search in news feeds, e-commerce, and recommendation systems needs to balance relevance wit...
Semantic search in news feeds, e-commerce, and recommendation systems needs to balance relevance with freshness. 𝗠𝗶𝗹𝘃𝘂𝘀 𝗽𝗿𝗼𝘃𝗶𝗱𝗲𝘀 𝘁𝗵𝗿𝗲𝗲 𝗱𝗲𝗰𝗮𝘆 𝗳𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀 𝗳𝗼𝗿 𝗿𝗲𝗿𝗮𝗻𝗸𝗶𝗻𝗴. Three decay models are available, each producing a different freshness curve: • 𝗘𝘅𝗽𝗼𝗻𝗲𝗻𝘁𝗶𝗮𝗹: fast initial decay with a long tail. News and social feeds where recency should dominate. • 𝗚𝗮𝘂𝘀𝘀𝗶𝗮𝗻: bell-shaped curve with gradual roll-off. Balanced search like restaurant recommendations, where moderate distance should reduce rather than eliminate a result's score. • 𝗟𝗶𝗻𝗲𝗮𝗿: constant penalty with a clear cutoff point. Event search where anything older than two weeks should not appear at all. In this test, the query is "artificial intelligence advancements," against seven articles spanning 1 to 120 days old, under four ranking approaches. No decay: pure semantic similarity. • Ranking is determined entirely by L2 distance (lower = more similar). Time is invisible. • Two articles with nearly identical content but published 90 days apart score the same: 0.7090. The 90-day-old article sits at #1 . • An article about "AI Ethics Guidelines" scores lowest because "ethics" is semantically farther from "advancements" than the other articles, even though it is also about AI. Gaussian decay (offset: 7 days, scale: 14 days, decay: 0.5) • The two newest articles (1-day and 5-day) jump to the top two positions. Both fall within the 7-day offset, so they receive no time penalty and rank by their original semantic similarity. • A 15-day-old article drops to 0.3601 but stays visible. A 30-day-old article falls to 0.0642. • Everything older than 60 days: 0.0000. The bell curve penalizes gradually at first, then sharply. Exponential decay (offset: 3 days, scale: 10 days, decay: 0.3) • A 1-day-old article scores 0.5979. A 5-day-old article drops to 0.4774 because it has already exceeded the 3-day offset, even though it is still relatively new. • At 15 days: 0.1065, far below Gaussian's 0.3601 for the same article. At 30 days: nearly zero. • Under this configuration, the steepest curve. It forgets faster than Gaussian and penalizes harder at every age beyond the offset. Linear decay: the most gradual decline. • A 90-day-old article still scores 0.3037. A 120-day-old article: 0.2339. Both score zero under Gaussian and exponential. • Because the penalty is constant rather than accelerating, semantic relevance carries more weight relative to time. A highly relevant 90-day-old article outranks a weakly relevant 30-day-old one: the time penalty was not steep enough to override the stronger semantic match. • The slope is gentle, but linear decay does reach zero at a clear cutoff point, giving you a predictable expiration boundary. 𝗖𝗵𝗼� milvus.io/docs/tutorial-… 𝘃𝗲 𝗺𝗮𝘁𝘁𝗲𝗿𝘀 𝗺𝗼𝗿𝗲 𝘁𝗵𝗮𝗻 𝗰𝗵𝗼𝗼𝘀𝗶𝗻𝗴 𝘁𝗼 𝗮𝗱𝗱 𝗱𝗲𝗰𝗮𝘆. Learn more here: https://t.co/72j2ip5E7I 💬 0 🔄 0 ❤️ 0 👀 60 ⚡