用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/UltronCore/claude-skill-vault --skill mteb命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Build Raycast extensions using the Raycast API: commands, list views, forms, and preferences. Triggers on: Raycast, @raycast/api, raycast extension, raycast command, showToast, List.Item, Action.
正在显示 SKILL.md
基于 SOC 职业分类
| name | mteb |
| description | Massive Text Embedding Benchmark for evaluating and comparing embedding models across tasks |
| version | 1.0.0 |
| tags | ["embeddings","benchmark","evaluation","nlp","sentence-transformers","retrieval"] |
MTEB (Massive Text Embedding Benchmark) is the standard benchmark suite for evaluating text embedding models across 8 task categories and 56+ datasets. It covers classification, clustering, pair classification, reranking, retrieval, STS (semantic textual similarity), summarization, and bitext mining. MTEB is the go-to leaderboard for selecting the right embedding model for your use case — before you commit to a model in production, run MTEB to understand trade-offs.
GitHub: https://github.com/embeddings-benchmark/mteb (2k+ stars) Leaderboard: https://huggingface.co/spaces/mteb/leaderboard
pip install mteb
# Sentence-transformers for most models
pip install sentence-transformers
# Optional: for specific model backends
pip install torch transformers
import mteb
from sentence_transformers import SentenceTransformer
# Load your embedding model
model = SentenceTransformer("BAAI/bge-small-en-v1.5")
# Select a specific task
tasks = mteb.get_tasks(tasks=["STS12"])
# Run evaluation
evaluation = mteb.MTEB(tasks=tasks)
results = evaluation.run(model, output_folder="results/bge-small")
# Results saved to JSON and printed
print(results)
import mteb
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("intfloat/e5-large-v2")
# Get all English tasks
tasks = mteb.get_tasks(languages=["eng"])
evaluation = mteb.MTEB(tasks=tasks)
results = evaluation.run(
model,
output_folder="results/e5-large",
overwrite_results=False, # Skip already-computed tasks
)
import mteb
# Available categories: Classification, Clustering, PairClassification,
# Reranking, Retrieval, STS, Summarization, BitextMining
# Retrieval tasks only (most important for RAG)
retrieval_tasks = mteb.get_tasks(task_types=["Retrieval"])
# STS tasks for similarity use cases
sts_tasks = mteb.get_tasks(task_types=["STS"])
# Multiple categories
tasks = mteb.get_tasks(task_types=["Retrieval", "Reranking", "STS"])
model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
evaluation = mteb.MTEB(tasks=tasks)
results = evaluation.run(model, output_folder="results/minilm")
import mteb
import json
from pathlib import Path
retrieval_tasks = mteb.get_tasks(
task_types=["Retrieval"],
languages=["eng"],
)
models_to_compare = [
"BAAI/bge-small-en-v1.5",
"sentence-transformers/all-MiniLM-L6-v2",
]
for model_name in models_to_compare:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(model_name)
evaluation = mteb.MTEB(tasks=retrieval_tasks)
results = evaluation.run(
model,
output_folder=f"results/{model_name.replace('/', '_')}",
)
# Load and compare results
def load_avg_score(results_dir: str, metric: str = "ndcg_at_10") -> float:
scores = []
for result_file in Path(results_dir).glob("**/*.json"):
data = json.loads(result_file.read_text())
if metric in data.get("scores", {}).get("test", [{}])[0]:
scores.append(data["scores"]["test"][0][metric])
return sum(scores) / len(scores) if scores else 0.0
for model_name in models_to_compare:
safe_name = model_name.replace("/", "_")
avg = load_avg_score()
()
import mteb
from mteb import DenseTextEncoder
# Wrap any model that has encode() → np.ndarray
class MyCustomEmbedder:
def __init__(self, model_path: str):
from sentence_transformers import SentenceTransformer
self.model = SentenceTransformer(model_path)
def encode(self, sentences, batch_size=32, **kwargs):
return self.model.encode(sentences, batch_size=batch_size, **kwargs)
my_model = MyCustomEmbedder("/path/to/my-fine-tuned-model")
tasks = mteb.get_tasks(tasks=["MSMARCO", "NFCorpus", "SciFact"])
evaluation = mteb.MTEB(tasks=tasks)
results = evaluation.run(my_model, output_folder="results/my-model")
import mteb
from sentence_transformers import SentenceTransformer
# Fast single-dataset check before running full benchmark
model = SentenceTransformer("BAAI/bge-base-en-v1.5")
# STSBenchmark is fast and widely reported
tasks = mteb.get_tasks(tasks=["STSBenchmarkSTS"])
evaluation = mteb.MTEB(tasks=tasks)
results = evaluation.run(model, output_folder="results/quick-check")
# Check the score
for task_result in results:
print(f"Task: {task_result.task_name}")
print(f"Spearman: {task_result.scores['test'][0]['spearman_cosine']:.4f}")
import mteb
# See all available tasks
all_tasks = mteb.get_tasks()
print(f"Total tasks: {len(all_tasks)}")
# Filter by category and language
en_retrieval = mteb.get_tasks(task_types=["Retrieval"], languages=["eng"])
print(f"English retrieval tasks: {len(en_retrieval)}")
for task in en_retrieval:
print(f" - {task.metadata.name}")
overwrite_results=False to skip already-completed tasks and resume interrupted runsembedding-pipeline — building production embedding pipelinestrain-sentence-transformers — fine-tuning sentence-transformers modelspeft-fine-tuning — parameter-efficient fine-tuning for embeddingssemantic-search — applying embeddings in search systemsragas — evaluating RAG systems (uses embeddings)tool: mteb
category: llm-evaluation
tier: library
interface: python-sdk
platform: cross-platform
stars: 2000+