embedding-strategy-advisor
Skill3 starsChanged 4 months agoMITView on GitHub
Select and configure embedding models and indexing strategy for a RAG corpus based on domain, language, and quality requirements. Use when working on RAG pipelines, chunking, embeddings, retrieval, or hybrid search.
In this repository59 other files it gives its agents.
- agent-memory-designerSkill
- ai-cost-optimizerSkill
- ai-evaluation-builderSkill
- ai-latency-optimizerSkill
- ai-solution-architectSkill
- ai-workflow-builderSkill
- context-engineeringSkill
- human-in-the-loop-designerSkill
- multi-agent-plannerSkill
- prompt-engineerSkill
- prompt-optimizerSkill
- prompt-reviewerSkill
- adr-generatorSkill
- api-designerSkill
- architecture-reviewSkill
- component-diagram-builderSkill
- container-diagram-builderSkill
- data-flow-analyzerSkill
- integration-plannerSkill
- observability-plannerSkill
- scalability-advisorSkill
- solution-architectureSkill
- system-context-builderSkill
- experiment-designerSkill
- go-to-market-plannerSkill
- pricing-strategy-advisorSkill
- mcp-best-practicesSkill
- mcp-client-generatorSkill
- mcp-security-reviewSkill
- mcp-server-generatorSkill
- mcp-tool-generatorSkill
- acceptance-criteria-generatorSkill
- analytics-instrumentation-plannerSkill
- competitive-analysisSkill
- epic-generatorSkill
- feature-prioritizationSkill
- idea-validatorSkill
- north-star-metric-advisorSkill
- okr-builderSkill
- persona-generatorSkill
- prd-generatorSkill
- problem-statement-builderSkill
- product-discovery-assistantSkill
- product-vision-builderSkill
- sprint-plannerSkill
- story-mappingSkill
- user-story-generatorSkill
- value-proposition-designerSkill
- chunking-strategy-advisorSkill
- hybrid-search-advisorSkill
- knowledge-ingestion-plannerSkill
- rag-architecture-designerSkill
- retriever-optimizerSkill
- ai-governance-advisorSkill
- ai-threat-modelingSkill
- guardrails-builderSkill
- owasp-llm-reviewerSkill
- prompt-injection-detectorSkill
- skill-nameSkill
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 55
When corpus or model changes:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Strategy Advisor
Purpose
Select and configure embedding models and indexing strategy for a RAG corpus based on domain, language, and quality requirements.
Input: Corpus description, languages, domain (general/technical/legal), budget, latency requirements
Output: Embedding strategy document with model recommendation, dimension trade-offs, and index configuration
Examples: See examples.md for worked input/output.
Workflow
Step 1: Profile the corpus
- Languages and multilingual needs
- Domain specificity (general, code, medical, legal)
- Corpus size (chunks count)
- Query-document similarity type (semantic, keyword-hybrid)
Step 2: Evaluate embedding options
| Model | Dimensions | Multilingual | Domain fit | Cost |
Compare API models (OpenAI, Cohere, Voyage) vs open-weight (BGE, E5, GTE).
Step 3: Recommend embedding model
Selection criteria:
- Retrieval quality on domain sample (MRR, recall@k)
- Latency for query embedding
- Cost at projected volume
- Self-hosting feasibility
Step 4: Define index configuration
- Distance metric: cosine, dot product, L2
- Index type: HNSW parameters (ef, M)
- Quantization if corpus > 1M chunks
Step 5: Plan re-embedding strategy
When corpus or model changes:
- Version embeddings
- Batch re-embed pipeline
- Dual-index migration period
Step 6: Validate
Run Validation checklist.
Decision Rules
| Condition | Action |
| Multilingual corpus | Require multilingual model; avoid English-only |
| Code-heavy corpus | Consider code-specific embeddings |
| Budget constrained | Recommend open-weight self-hosted with ops cost note |
| Latency < 100ms for embed | Prefer smaller dimension models |
| Domain highly specialized | Recommend fine-tuning or domain-specific model eval |
Validation
- Corpus profile complete
- ≥2 embedding options compared
- Recommendation with quality/cost/latency rationale
- Index configuration specified
- Re-embedding strategy documented
- Dimension and metric choices explained
- Eval method for embedding quality stated
Anti-patterns
- Default model — using text-embedding-3-small without domain eval.
- Dimension mismatch — mixing embeddings from different models in one index.
- No re-embed plan — model lock-in without migration path.
- Ignoring query embedding cost — only indexing cost considered.
- Over-quantization — precision loss without quality check.
Best Practices
- Eval embeddings on domain-specific golden queries.
- Match embedding model to chunking strategy.
- Store model version in index metadata.
- Benchmark query latency at p95, not average.
- Align with chunking-strategy-advisor output.
Output Structure
# Embedding Strategy: [Corpus Name]
## Corpus Profile
| Attribute | Value |
|-----------|-------|
## Options Compared
| Model | Dims | Quality | Cost | Latency |
|-------|------|---------|------|---------|
## Recommendation
**Model:** [name]
**Rationale:** [why]
## Index Config
| Setting | Value |
|---------|-------|
## Re-embedding Plan
[Strategy]
## Eval Results
| Metric | Score |
|--------|-------|Next Skills
| Outcome | Recommended Skill |
| Tune retrieval | rag/retriever-optimizer |
| Hybrid search | rag/hybrid-search-advisor |
| Chunking tuning | rag/chunking-strategy-advisor |
| RAG architecture | rag/rag-architecture-designer |
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.

