AI GLOSSARY · AI CONCEPTS

Sentence Transformers

Markdown version · Wikidata Q120634773

Definition

Sentence Transformers is a Python library for using and training embedding and reranker models. Its documented inputs include text and, for suitable models, images, audio, and video.

Also called: SentenceTransformers, sentence-transformers, SBERT, Sentence-BERT.

In plain language

Sentence Transformers can encode inputs as vectors and score how closely inputs relate under a selected model. For text, this supports semantic search, similarity comparison, clustering, and paraphrase mining. The current documentation also covers rerankers, sparse encoders, multi-vector encoders, and multimodal inputs. Its documented core jobs here are encoding and scoring inputs, not serving as a chat assistant that composes answers.

Technical definition

The original Sentence-BERT method modifies pretrained BERT with siamese and triplet structures to derive sentence embeddings that can be compared with cosine similarity. The modern Sentence Transformers library has a broader documented scope: dense embedding models, Cross-Encoder rerankers, sparse encoders, multi-vector encoders, and supported multimodal models. Scores and vectors remain model-dependent and should be evaluated on representative queries and documents.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Guide · Illustrative, not executed

    What Is RAG? Retrieval-Augmented Generation Explained

    What you see
    A guide showing how retrieval, chunking, embeddings, and generation can form a document-question-answering pipeline.
    Why it exercises the concept
    Sentence Transformers can supply embeddings or reranking for a retrieval stage. The guide explains that stage but does not require, execute, or benchmark this particular library.
  2. Skill by Skill Almanac · Illustrative, not executed

    rag-chunking-planner 56/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A planner that compares document chunking settings and reports structural defects and offline BM25 recall.
    Why it exercises the concept
    Chunk boundaries determine the inputs later sent to an embedding model. This is useful preparation for retrieval, but the skill does not run Sentence Transformers or measure embedding-based recall.

How it shows up when you use agents

Sentence Transformers may appear in an agent’s retrieval layer rather than in the conversational interface. For text retrieval, an embedding model converts a query and candidate passages into vectors, after which a similarity function can rank candidates. The library also documents Cross-Encoder rerankers that score query-passage pairs, as well as sparse and multi-vector encoders. Suitable current models can accept modalities beyond text, including images, audio, or video.

In a retrieval-augmented generation workflow, these components can help select passages before a generative model writes an answer. Retrieval and generation remain separate operations: a high similarity score indicates closeness under the selected model, not that a passage is factually correct or contains a complete answer.

To evaluate a setup, record the exact model used and test real queries whose relevant documents are already known. Inspect both missed relevant passages and highly ranked irrelevant passages. If a model changes, do not assume its vectors or scores are interchangeable with the previous model’s outputs. Validate comparability before mixing them; otherwise re-encode the corpus and compare retrieval results on the same question set. This is an operational recommendation, not a compatibility guarantee supplied by the cited pages.

Common confusions

  • Sentence Transformers versus Transformers. The Transformers library is a broader model library. Sentence Transformers focuses on documented embedding, reranking, sparse-encoding, and multi-vector workflows.
  • Embedding model versus reranker. An embedding model encodes items independently for efficient retrieval. A cross-encoder scores an input pair together and can rerank a smaller candidate set.
  • SBERT method versus modern library. The 2019 Sentence-BERT paper describes a BERT modification using siamese and triplet structures. The current library carries the SBERT name but documents additional architectures and modalities.
  • Similarity versus correctness. Cosine similarity or another model score reflects the representation being used. It does not verify a claim or guarantee that the top passage answers the query.
  • Encoding versus answering. The documented operations discussed here create representations or relevance scores. A separate application component may use those results to compose an answer.

Terms that mention Sentence Transformers

2 terms mention this one

More in AI concepts

Next steps

  1. What Is RAG? Retrieval-Augmented Generation Explained The long-form guide.
  2. rag-chunking-planner A skill that exercises it.
  3. Cross-encoder Related term.
  4. Embedding Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; revisions: OpenAI Codex (configured gpt-5.6-sol); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .

Change log (5)
  • : Independent automated factual/example/alias correction review closed with transparent bounded followups and simulated-reader blocker closure. Cached broad US definition demand; AI-exclusive share unmeasured. Final runtime gate separate; publication disabled.
  • : Private correction of independent source/example/alias and reader findings; exact-version closure and runtime gates pending. Cached broad US definition demand, not AI-exclusive traffic.
  • : First version.
  • : Verifier pass: removed an unsourced adjective and an unsourced package claim, and marked the model-mixing advice as practice.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.