sentence-transformers

Generate sentence, text, and image embeddings for semantic search and RAG.

5|2|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill sentence-transformers-medtilab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sentence-transformers
Source: https://github.com/MedTiLab/Auto-meta-analysis/tree/main/skills/rag/sentence-transformers
Command: npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill sentence-transformers-medtilab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sentence-transformers, transformers, torch, and includes references (resource) components.

What problem does it solve? Generating high-quality text embeddings locally without relying on paid embedding APIs is difficult when you need semantic similarity, clustering, or retrieval for RAG pipelines. This Skill provides instructions and model guidance for producing embeddings with the sentence-transformers Python framework. ## Core Features & Use Cases - Local Embedding Generation: Encode sentences and documents into vectors using 5000+ pre-trained models running on your own hardware. - Semantic Search & Similarity: Compute cosine similarity and run top-k semantic search over encoded corpora. - Multilingual & Domain Models: Select from 100+ language models and domain-specific models for legal, scientific, and code text. - Use Case: Build a RAG pipeline by encoding your document corpus with all-mpnet-base-v2, then retrieve the most relevant passages for each user query via semantic search. ## Quick Start Use the sentence-transformers skill to generate embeddings for my document corpus and find the passages most similar to a given query.

Frequently Asked Questions about sentence-transformers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate sentence embeddings in Python?▼

Load a model with SentenceTransformer('all-MiniLM-L6-v2') and call model.encode() on your list of sentences. The method returns embedding vectors that you can compare with cosine similarity for search or clustering tasks.

Which sentence-transformers model should I use for RAG?▼

For production RAG, all-mpnet-base-v2 offers a good balance of 768-dimensional quality and speed. For quick prototyping use all-MiniLM-L6-v2, and for highest accuracy use all-roberta-large-v1 at the cost of slower encoding.

Does sentence-transformers support multilingual embeddings?▼

Yes, models like paraphrase-multilingual-mpnet-base-v2 support 50+ languages, and LaBSE covers 109 languages. These models map sentences from different languages into a shared vector space for cross-lingual search.

Can I use sentence-transformers with LangChain or LlamaIndex?▼

Yes, LangChain provides HuggingFaceEmbeddings and LlamaIndex provides HuggingFaceEmbedding wrappers that accept any sentence-transformers model name. These plug directly into vector stores like Chroma for retrieval pipelines.

When should I use OpenAI embeddings instead of sentence-transformers?▼

Use OpenAI embeddings when you need a managed API service and prefer not to run models locally. Sentence-transformers is better when you need local inference, no per-token API costs, or domain-specific fine-tuning on your own data.