headlinne

⚙️ Recommendation Engine

Embeddings and Vector Search

Embeddings turn articles and interests into vectors, and vector search finds the closest matches. Learn how Headlinne uses them to power semantic recommendations and search.

By Headlinne Editorial Team · Updated on

What an embedding is

An embedding is a list of numbers—a vector—that represents the meaning of a piece of text. An embedding model reads an article and outputs, say, a 768-dimensional vector positioned so that texts with similar meaning land close together in that space and unrelated texts land far apart.

This is powerful because it captures meaning, not just keywords. Two articles about the same event can share almost no exact words yet sit near each other in embedding space.

From articles to a taste vector

Headlinne embeds each article, then builds a per-user "taste vector" by combining the embeddings of content the user has engaged with. This centroid represents the user's interests as a single point in the same space as the articles.

Because taste vectors are averages of many article embeddings, they sit a little further from any single article than a direct query would—so Headlinne uses a more lenient similarity band when turning cosine distance into a ranking signal.

Vector search and ANN

To find articles near the taste vector, the engine performs vector search: it looks for the nearest vectors to a query point. Doing this exactly across a large corpus is slow, so systems use Approximate Nearest Neighbor (ANN) search—trading a tiny amount of accuracy for a large speed gain.

Headlinne runs ANN search inside its database via a vector index, returning both extra candidate articles and a per-article similarity score used in ranking.

Why embeddings matter for news

Embeddings unlock capabilities keyword systems cannot:

  • Matching interests to articles by meaning, not exact words
  • Finding related coverage across different publishers and phrasings
  • Powering semantic search that understands a question's intent
  • Grouping stories about the same event for timelines and Dive Deeper

Key takeaways

  • Embeddings are vectors that place similar-meaning texts close together.
  • Headlinne builds a per-user taste vector by averaging engaged articles' embeddings.
  • ANN vector search finds nearby articles fast, trading tiny accuracy for big speed.

Frequently asked questions

What does 768 dimensions mean?

Each article is represented by a vector of 768 numbers. More dimensions can capture more nuance; the exact size is a property of the embedding model Headlinne uses.

Is vector search the same as keyword search?

No. Keyword search matches exact words; vector search matches meaning. An article can rank high in vector search while sharing few or no exact keywords with the query.

Related Headlinne features

Related reading

Continue learning

Start reading personalized news with Headlinne

Create your free account and build a feed that learns what you care about.