sentence-transformers

Generate sentence and text embeddings for semantic search, clustering, and RAG pipelines.

2|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/Shubh2310-developer/ENGUNITYCORE --skill sentence-transformers-shubh2310-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentence-transformers
Source: https://github.com/Shubh2310-developer/ENGUNITYCORE/tree/main/.claude/skills/rag-sentence-transformers
Command: npx skills add https://github.com/Shubh2310-developer/ENGUNITYCORE --skill sentence-transformers-shubh2310-developer

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 for semantic search, retrieval-augmented generation, and similarity tasks requires choosing the right model and integration pattern, which is time-consuming without guidance. ## Core Features & Use Cases - Local Embedding Generation: Encode sentences into dense vectors using 5000+ pre-trained models without calling external APIs. - Semantic Search & Similarity: Compute cosine similarity and run top-k semantic search over document corpora. - Framework Integration: Plug embeddings into LangChain and LlamaIndex vector stores for RAG pipelines. - Use Case: Build a multilingual document search engine by encoding your corpus with paraphrase-multilingual-mpnet-base-v2 and querying it with semantic_search. ## Quick Start Use the sentence-transformers skill to generate embeddings for a list of documents and find the most similar passages to my 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 result is a NumPy array of dense vectors, for example 384 dimensions per sentence with MiniLM.

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 prototyping, all-MiniLM-L6-v2 is faster at roughly 2000 sentences per second, while all-roberta-large-v1 gives the highest accuracy.

Does sentence-transformers support multilingual embeddings?

Yes, models like paraphrase-multilingual-mpnet-base-v2 support over 50 languages, and LaBSE covers 109 languages. These are suitable for cross-lingual semantic search and multilingual document retrieval.

Can I use sentence-transformers with LangChain or LlamaIndex?

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

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

Use OpenAI embeddings when you need a managed API with no local compute and potentially higher quality. Sentence-transformers is better when you need local inference, no API costs, offline operation, or domain-specific fine-tuning.