Open source

Sentence Transformers

Quick explainer2 min readIntermediate

Sentence Transformers is an open-source Python library for turning text, and other media, into embeddings: lists of numbers where similar meanings end up close together.

In plain words

To search by meaning, a computer needs to compare sentences as numbers. Sentence Transformers loads a model, gives each sentence a vector, and lets you compare vectors, for example with cosine similarity. It grew out of Sentence-BERT, which made finding similar sentences vastly faster than feeding every pair into BERT. The library also runs reranker models and lets you fine-tune your own, and thousands of ready-made models are on Hugging Face.

A quick example

The library's own example uses three sentences: one about lovely weather, one about sunshine outside, and one about driving to a stadium. Each becomes a vector. The two weather sentences score about 0.67 for similarity, while the stadium sentence scores about 0.1 against each, even though the weather pair shares few exact words.

Where you'll meet it

  • Semantic search and retrieval for RAG.
  • Finding similar or duplicate texts.
  • Reranking search results.

Related

Sources

  1. DocsSentenceTransformers Documentation, Sentence Transformers (Hugging Face) · read 29 Sept 2026
  2. PaperSentence-BERT: Sentence Embeddings using Siamese BERT-Networks, Reimers and Gurevych (arXiv) · read 29 Sept 2026
  3. Docshuggingface/sentence-transformers, Hugging Face (GitHub) · read 29 Sept 2026

Checked by WhatIsAI against the sources above · 29 Sept 2026. Spotted an error? Report it.