embedding-model-selection
Skill1 starsChanged 32 days agoMITView on GitHub
Choose and evaluate embedding models for search, RAG and clustering — multilingual quality, dimensions and cost, context length, licence and hosting (EU or self-hosted), benchmarking on your own queries, and safe migration between models. Use when building a vector search or RAG index, when retrieval quality is poor in some languages, or when planning to switch embedding models.
In this repository105 other files it gives its agents.
- AGENTS.mdAGENTS.md
- instructions/AGENTS.mdAGENTS.md
- accessibility-reviewSkill
- agent-evaluationSkill
- agent-guardrailsSkill
- agenthub-routerSkill
- ai-red-teamingSkill
- ansible-reviewSkill
- api-designSkill
- api-integrationSkill
- architecture-decisionSkill
- backup-restoreSkill
- caching-strategySkill
- chaos-engineeringSkill
- ci-cd-pipeline-designSkill
- cloud-cost-optimizationSkill
- cloud-iam-least-privilegeSkill
- code-reviewSkill
- container-image-optimizationSkill
- cyber-resilience-actSkill
- database-migrationsSkill
- data-pipeline-reviewSkill
- data-privacySkill
- data-quality-checksSkill
- debugging-root-causeSkill
- dependency-auditSkill
- dependency-upgradeSkill
- disaster-recovery-drillSkill
- docker-hardeningSkill
- documentationSkill
- dora-readinessSkill
- dpiaSkill
- email-deliverabilitySkill
- error-handling-reviewSkill
- eu-ai-act-readinessSkill
- eu-data-sovereigntySkill
- european-accessibility-actSkill
- event-driven-architectureSkill
- feature-flagsSkill
- frontend-reviewSkill
- gdpr-dsar-handlingSkill
- github-actionsSkill
- gitlab-ciSkill
- git-workflowSkill
- go-developmentSkill
- graphql-api-reviewSkill
- helm-chart-reviewSkill
- i18n-localizationSkill
- incident-responseSkill
- java-spring-reviewSkill
- kubernetes-reviewSkill
- linux-server-hardeningSkill
- llm-cost-analysisSkill
- llm-gateway-routingSkill
- llm-observabilitySkill
- llm-output-evaluationSkill
- llm-structured-extractionSkill
- load-testingSkill
- local-llm-servingSkill
- log-analysisSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Every candidate evaluated on the same queries and chunks, with per-language results.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Embedding Model Selection
Goal
Pick the embedding model that retrieves best for your data, languages and constraints — measured on your own queries, not only on public leaderboards.
Inputs
- Corpus samples and languages (for example Slovenian, German, English), query logs or realistic questions, latency and cost limits, hosting constraints (EU, on-premise), index size.
Procedure
- Shortlist 3–5 models across hosting options: API models, open-weight multilingual models runnable on your own GPU or CPU, and a lexical baseline (BM25). Check licences for commercial use.
- Build an evaluation set: 50–200 queries with labelled relevant documents, covering each language, short and long queries, identifiers and jargon.
- Index identically: same chunking and preprocessing for every model; record dimensions and normalization.
- Measure recall@k, MRR or nDCG per language and query type; hybrid (vector + BM25) and with a reranker if one is planned (see
rag-evaluation). - Cost and performance: embedding throughput, cost per million tokens or GPU hours, index size (dimensions × vectors × bytes), query latency; consider dimension reduction or quantization if the model supports it.
- Operational fit: context length vs chunk size, rate limits, model versioning and deprecation policy, data processing terms (where text is sent).
- Decide with a table of quality, cost, latency and sovereignty; record the decision (see
architecture-decision). - Migrate safely: embeddings from different models are not comparable — re-embed the whole corpus into a new index, run both side by side, switch reads after evaluation, keep the old index for rollback.
Example fixture
Results (recall@10): BM25 0.61 | API model A 0.78 (EN 0.84, SL 0.66) | open multilingual model B 0.81 (EN 0.82, SL 0.79) | B + BM25 hybrid 0.86.
Decision: model B self-hosted (EU), hybrid retrieval; re-embed corpus (2.1 M chunks, ~6 GPU hours).Acceptance checks
- Every candidate evaluated on the same queries and chunks, with per-language results.
- Index size and cost estimates included for the chosen model.
- Negative case: mixing vectors from two models in one index is prevented (model name and version stored with each vector and checked at query time).
Output
Evaluation report, decision record, migration plan.
Safety
Corpus samples sent to external embedding APIs leave your control: use synthetic or approved data, or self-hosted models, for confidential content. Large benchmark runs and full re-embedding can be costly: agree a budget first. Switching production reads to a new index is a production change that needs owner approval and a rollback plan.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

