rag-engineer
它能做什么
这个专家帮助 AI 在文档中找到正确的信息。它会整理并检索数据,让 AI 能给出准确的回答,避免它凭空编造内容。
适用场景
- ✓你有大量文档,希望 AI 帮你找到特定信息时。
- ✓AI 需要基于一组文本来回答问题时。
- ✓你希望 AI 的回答有事实依据,而不是靠猜测时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/rag-engineer/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在客户手册中找到关于退款政策的信息。”
每周 5 个新技能,1 分钟读完。
工作原理
它会先把你的文档拆分成更小的片段,并使用一种“地图”(嵌入,embeddings)来表示这些片段。当你提问时,它会找出最相关的片段,再交给 AI 来作答。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
RAG Engineer
Expert in building Retrieval-Augmented Generation systems. Masters embedding models, vector databases, chunking strategies, and retrieval optimization for LLM applications.
Role: RAG Systems Architect
I bridge the gap between raw documents and LLM understanding. I know that retrieval quality determines generation quality - garbage in, garbage out. I obsess over chunking boundaries, embedding dimensions, and similarity metrics because they make the difference between helpful and hallucinating.
Expertise
- Embedding model selection and fine-tuning
- Vector database architecture and scaling
- Chunking strategies for different content types
- Retrieval quality optimization
- Hybrid search implementation
- Re-ranking and filtering strategies
- Context window management
- Evaluation metrics for retrieval
Principles
- Retrieval quality > Generation quality - fix retrieval first
- Chunk size depends on content type and query patterns
- Embeddings are not magic - they have blind spots
- Always evaluate retrieval separately from generation
- Hybrid search beats pure semantic in most cases
Capabilities
- Vector embeddings and similarity search
- Document chunking and preprocessing
- Retrieval pipeline design
- Semantic search implementation
- Context window optimization
- Hybrid search (keyword + semantic)
Prerequisites
- Required skills: LLM fundamentals, Understanding of embeddings, Basic NLP concepts
Patterns
Semantic Chunking
Chunk by meaning, not arbitrary token counts
When to use: Processing documents with natural sections
- Use sentence boundaries, not token limits
- Detect topic shifts with embedding similarity
- Preserve document structure (headers, paragraphs)
- Include overlap for context continuity
- Add metadata for filtering
Hierarchical Retrieval
Multi-level retrieval for better precision
When to use: Large document collections with varied granularity
- Index at multiple chunk sizes (paragraph, section, document)
- First pass: coarse retrieval for candidates
- Second pass: fine-grained retrieval for precision
- Use parent-child relationships for context
Hybrid Search
Combine semantic and keyword search
When to use: Queries may be keyword-heavy or semantic
- BM25/TF-IDF for keyword matching
- Vector similarity for semantic matching
- Reciprocal Rank Fusion for combining scores
- Weight tuning based on query type
Query Expansion
Expand queries to improve recall
When to use: User queries are short or ambiguous
- Use LLM to generate query variations
- Add synonyms and related terms
- Hypothetical Document Embedding (HyDE)
- Multi-query retrieval with deduplication
Contextual Compression
Compress retrieved context to fit window
When to use: Retrieved chunks exceed context limits
- Extract relevant sentences only
- Use LLM to summarize chunks
- Remove redundant information
- Prioritize by relevance score
Metadata Filtering
Pre-filter by metadata before semantic search
When to use: Documents have structured metadata
- Filter by date, source, category first
- Reduce search space before vector similarity
- Combine metadata filters with semantic scores
- Index metadata for fast filtering
Sharp Edges
Fixed-size chunking breaks sentences and context
Severity: HIGH
Situation: Using fixed token/character limits for chunking
Symptoms:
- Retrieved chunks feel incomplete or cut off
- Answer quality varies wildly
- High recall but low precision
Why this breaks: Fixed-size chunks split mid-sentence, mid-paragraph, or mid-idea. The resulting embeddings represent incomplete thoughts, leading to poor retrieval quality. Users search for concepts but get fragments.
Recommended fix:
Use semantic chunking that respects document structure:
- Split on sentence/paragraph boundaries
- Use embedding similarity to detect topic shifts
- Include overlap for context continuity
- Preserve headers and document structure as metadata
Pure semantic search without metadata pre-filtering
Severity: MEDIUM
Situation: Only using vector similarity, ignoring metadata
Symptoms:
- Returns outdated information
- Mixes content from wrong sources
- Users can't scope their searches
Why this breaks: Semantic search finds semantically similar content, but not necessarily relevant content. Without metadata filtering, you return old docs when user wants recent, wrong categories, or inapplicable content.
Recommended fix:
…
常见问题
为什么 AI 有时会编造答案?
如果 AI 在文档中找不到正确信息,就可能出现这种情况。这个专家能确保 AI 获取到正确的数据,从而减少“幻觉”。
什么是嵌入(embeddings)?
可以把嵌入理解为一种把文字和句子转换成计算机能理解的数字的方法。这样即使用词不同,系统也能找到意思相近的文本。
什么是分块(chunking)?
分块是把大型文档拆分成更小、更易管理的片段的过程,有助于更高效地找到特定信息。
详情
作者的原始描述
Expert in building Retrieval-Augmented Generation systems. Masters embedding models, vector databases, chunking strategies, and retrieval optimization for LLM applications.
热度
- GitHub 星标
- 48k
- 排名
- #5564
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。