Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

embedding-generator嵌入生成器

Agent Skill

用于搭建或维护带检索增强的 RAG 工作流,适合让 Agent 处理知识库问答、向量检索、来源引用和事实核查。它可以辅助整理数据接入、Embedding、向量库、召回参数和回答生成流程。使用时需要确认数据来源、更新频率、召回阈值和引用展示方式,避免把未命中的资料或过期内容包装成确定事实。

总安装

20,989

周安装

751

GitHub Stars

公开资料未说明

下载量

9,684
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:embedding-generator(嵌入生成器)
来源仓库:https://github.com/eddiebe147/claude-settings
仓库路径:skills/embedding-generator
安装命令:
npx skills add eddiebe147/claude-settings --skill "embedding-generator"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add eddiebe147/claude-settings --skill "embedding-generator"

简介

用于搭建或维护检索增强型 RAG 工作流的工具。

  • 支持向量检索、来源引用与事实核查流程优化。
  • 适用于知识库问答与数据接入场景。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 需明确数据来源与召回阈值设置,避免误判事实。
  • embedding-generator 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
Embedding Generator
slug
embedding-generator
description
Generate and manage text embeddings for semantic search, clustering, and similarity tasks
category
ai-ml
complexity
intermediate
version
1.0.0
author
ID8Labs
triggers
tags

Embedding Generator

The Embedding Generator skill helps you create, manage, and utilize text embeddings for semantic search, similarity matching, clustering, and classification tasks. It guides you through selecting appropriate embedding models, preprocessing text for optimal vectorization, and storing/querying embeddings efficiently.

Text embeddings transform words, sentences, or documents into dense numerical vectors that capture semantic meaning. Similar concepts end up close together in vector space, enabling powerful AI applications like semantic search, recommendations, and content understanding.

This skill covers everything from choosing the right model (OpenAI, Cohere, sentence-transformers, etc.) to implementing production-ready embedding pipelines with proper batching, caching, and quality validation.

Core Workflows

Workflow 1: Generate Embeddings for Text Corpus

  1. Analyze the text corpus:

- Content type (documents, sentences, queries) - Average length and variation - Language(s) present - Domain specificity

  1. Select embedding model:

- Consider dimensionality vs performance tradeoff - Match model to content type - Evaluate cost and latency constraints

  1. Preprocess text:

- Clean and normalize - Chunk long documents appropriately - Handle special characters and formatting

  1. Generate embeddings with batching
  2. Validate quality with spot checks
  3. Store in appropriate vector database

Workflow 2: Choose Embedding Model

  1. Gather requirements:

- Use case (search, clustering, classification) - Latency requirements - Cost constraints - Accuracy needs

  1. Compare models:
ModelDimsSpeedQualityCost
OpenAI text-embedding-3-small1536FastGood$$
OpenAI text-embedding-3-large3072FastBest$$$
Cohere embed-english-v31024FastGreat$$
sentence-transformers384-768VariesGoodFree
Voyage AI1024FastGreat$$
  1. Benchmark on representative samples
  2. Document decision rationale

Workflow 3: Implement Embedding Pipeline

  1. Design pipeline architecture:

- Input preprocessing - Batching strategy - Error handling - Caching layer

  1. Implement core components:
   # Example pipeline structure
   def embedding_pipeline(texts):
       cleaned = preprocess(texts)
       chunks = chunk_if_needed(cleaned)
       batches = create_batches(chunks, batch_size=100)
       embeddings = []
       for batch in batches:
           result = model.embed(batch)
           embeddings.extend(result)
       return embeddings
  1. Add monitoring and logging
  2. Test with edge cases
  3. Optimize for production scale

Quick Reference

ActionCommand/Trigger
Generate embeddings"Generate embeddings for these texts"
Choose model"Which embedding model for [use case]"
Compare models"Compare embedding models"
Optimize pipeline"Speed up embedding generation"
Validate quality"Check embedding quality"
Chunk documents"How to chunk for embeddings"

Best Practices

  • Match Model to Use Case: Query-document search needs asymmetric models; clustering needs symmetric

- Search: Use models trained on query-passage pairs - Clustering: Use models with good sentence-level representations

  • Chunk Intelligently: Long texts must be chunked, but chunking strategy matters

- Preserve semantic units (paragraphs, sections) - Use overlapping chunks for continuity (10-20% overlap) - Keep chunk size within model's sweet spot (typically 256-512 tokens)

  • Batch for Efficiency: API calls are expensive; batch aggressively

- OpenAI: Up to 2048 texts per batch - Use async/concurrent processing for speed - Implement exponential backoff for rate limits

  • Cache Embeddings: Don't regenerate what you've already computed

- Hash text to create cache keys - Store embeddings with metadata - Invalidate cache when model changes

  • Normalize Vectors: Cosine similarity requires normalized vectors

- Most models output normalized vectors - Verify or normalize explicitly for consistency

  • Validate Quality: Spot-check embeddings before production use

- Test similarity between known-similar texts - Check that distances make semantic sense - Compare against baseline or ground truth

Advanced Techniques

Hybrid Chunking Strategy

Combine semantic and size-based chunking:

def hybrid_chunk(text, max_tokens=512):
    # First: Split on semantic boundaries
    sections = split_on_headers_paragraphs(text)

    # Then: Split large sections on size
    chunks = []
    for section in sections:
        if token_count(section) > max_tokens:
            chunks.extend(split_with_overlap(section, max_tokens))
        else:
            chunks.append(section)
    return chunks

Query Expansion for Better Retrieval

Generate multiple query embeddings for robust search:

Original: "machine learning frameworks"
Expanded: [
  "machine learning frameworks",
  "ML libraries and tools",
  "deep learning software",
  "AI development platforms"
]

Dimensionality Reduction

When storage or speed is critical:

- PCA: Fast, linear reduction
- UMAP: Preserves local structure
- Matryoshka embeddings: Models with variable-size outputs

Cross-Lingual Embeddings

For multilingual applications:

- Use multilingual models (mBERT, XLM-R, Cohere multilingual)
- Translate queries to embedding language
- Align embedding spaces post-hoc

Common Pitfalls to Avoid

  • Using the wrong model type (asymmetric vs symmetric) for your use case
  • Chunking in ways that break semantic meaning (mid-sentence, mid-paragraph)
  • Not accounting for rate limits in production systems
  • Storing embeddings without metadata needed for filtering
  • Regenerating embeddings unnecessarily (implement caching)
  • Mixing embeddings from different models in the same index
  • Ignoring the impact of text preprocessing on embedding quality

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.19%
按下载量换算2,730

OpenCode

22.08%
按下载量换算2,138

Gemini CLI

16.2%
按下载量换算1,569

Antigravity

12.59%
按下载量换算1,219

Cursor

7.53%
按下载量换算729

windsurf

2.89%
按下载量换算280

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills