Personalization Without Big Data: Ranking News in Telegram with pgvector and Five Signals

Introduction

Personalization is often seen as the exclusive domain of tech giants with massive data lakes and armies of data scientists. However, a recent case study published on Habr demonstrates that effective content ranking can be achieved without Big Data. The project team behind a Telegram news aggregation bot successfully implemented personalized news ranking using PostgreSQL’s pgvector extension and just five user signals. This approach challenges the assumption that meaningful personalization requires petabytes of user data. Instead, it shows that a focused, signal-based strategy paired with efficient vector similarity search can deliver relevant results even for small-scale applications.

The Core Challenge: Small-Scale News Personalization

Many independent developers and small teams face a common problem: how to personalize content for users without access to large-scale behavioral data. Traditional recommendation systems rely on collaborative filtering, deep learning models, and extensive user histories. The authors of the Habr article encountered this exact challenge while building a Telegram bot that aggregates news from various sources.

Their initial approach used simple keyword-based filtering, which produced generic results. Users received the same news regardless of their interests. To improve relevance without building a complex infrastructure, the team turned to pgvector — a PostgreSQL extension that enables vector similarity search directly within the database.

The Five Signals: A Lean Data Approach

The project team identified five key signals that could predict user preferences without requiring extensive data collection:

Signal Description Why It Works
Click-through rate (CTR) Whether the user opened a news article Direct indicator of interest
Reading time Time spent on the article Distinguishes skimming from deep engagement
Share/forward action User forwarded the article to others High-intent signal of value
Save/bookmark User saved the article for later Signals long-term interest
Category preference Explicit or implicit category choices Provides structure for initial recommendations

These signals were collected per user per article. The team then converted each article into a vector embedding using a lightweight sentence transformer model. The magic happened when they combined these embeddings with user signal vectors.

How pgvector Powers the Ranking

pgvector is an open-source extension for PostgreSQL that allows storing vectors (arrays of floating-point numbers) and performing similarity searches. The project team stored article embeddings and user preference vectors side by side in the same database. For each user, they computed a dynamic preference vector based on their interaction signals.

The ranking algorithm worked as follows:
1. When a user interacts with an article, the system updates their preference vector using a weighted sum of the article’s embedding and the signal values.
2. For a new batch of news, the system calculates the cosine similarity between each article’s embedding and the user’s current preference vector.
3. Articles are ranked by similarity score, with higher scores appearing first in the user’s feed.

The authors reported that this approach achieved a significant improvement in click-through rates compared to the generic feed — without requiring any external data sources or complex infrastructure.

Real-World Results and Lessons Learned

The project team shared concrete outcomes from their implementation:

  • CTR increased by approximately 30% after switching from keyword-based filtering to the pgvector ranking.
  • User retention improved as users received more relevant content.
  • Infrastructure costs remained low — the entire system ran on a single PostgreSQL instance without additional services.

They also encountered a few pitfalls. The most notable was the cold start problem: new users with no interaction history received generic recommendations. To solve this, the team introduced an onboarding step where users selected preferred categories. This initial signal was enough to bootstrap the vector-based ranking.

Another challenge was embedding freshness. News articles are time-sensitive, so the team implemented a time-decay factor that reduced the importance of older interactions. This ensured that the preference vector adapted to changing user interests.

Why This Matters for Independent Developers

This case demonstrates that personalization is not reserved for companies with millions of users and dedicated data teams. With pgvector and a handful of well-chosen signals, anyone running a Telegram bot or a small web service can implement a ranking system that feels intelligent and responsive.

The key insight is that quality trumps quantity when it comes to user signals. Instead of collecting every possible data point, the team focused on signals that directly indicated user intent. This lean approach reduces data storage requirements, simplifies privacy compliance, and keeps the system transparent.

ASI Biont supports integration with Telegram through its API, enabling similar personalized content delivery — more details on asibiont.com/courses.

Conclusion

The project described in the Habr article proves that effective personalization can be achieved without Big Data. By combining pgvector’s vector similarity search with five carefully selected user signals, the team built a news ranking system that outperformed generic feeds and kept infrastructure costs minimal. For developers looking to add personalization to their own projects, this approach offers a practical, scalable starting point. The source article provides further technical details and code examples for those ready to implement similar systems.

Source

← All posts

Comments