RAG Implementation
Use when designing or reviewing Retrieval-Augmented Generation systems, knowledge search, document Q&A, grounding, citations, or retrieval evaluation.
Install
npx skills add sandbaseai/workbuddy-skill --skill rag-implementationgit clone --depth 1 https://github.com/sandbaseai/workbuddy-skill.git /tmp/workbuddy-skill
mkdir -p ~/.claude/skills
cp -r /tmp/workbuddy-skill/skills/rag-implementation ~/.claude/skills/rag-implementationPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# RAG Implementation 把外部知识可靠地带入模型上下文,让答案可追溯、可拒答、可评测。RAG 不是“接一个向量库”:要同时设计来源、解析、切分、索引、召回、重排、上下文预算、生成、引用和反馈闭环。 ## 使用边界 - 开始前确认知识库 owner、来源许可证、更新频率、访问范围、租户边界、模型/embedding 版本、延迟与成本目标。 - 默认只读检查 schema、索引配置、检索结果和评测样本;使用合成、脱敏或已获授权的语料,不把用户输入自动写入知识库。 - 不擅自抓取受限内容、建立跨租户索引、删除/重建索引、上传文档、改变 ACL 或切换生产模型;这些是明确授权的副作用。 - 语料、向量 metadata、prompt、检索结果、trace 和评测集可能含敏感信息,报告只保留最小必要字段并脱敏。 ## 先定义质量契约 在选型前写清问题类型、可接受的“不知道”、引用格式、时效性、语言、最大延迟、预算和安全约束。把质量拆成可测信号: - **Retrieval**:相关文档是否进入 top-k(Recall@k、MRR、nDCG),过滤/租户边界是否正确。 - **Grounding**:回答中的关键主张是否被上下文支持,是否引用正确来源和版本。 - **Answer**:完整性、准确性、拒答质量、格式遵循和有害内容防护。 - **Operations**:索引 freshness、失败率、p95 延迟、token/查询成本、provider 错误和漂移。 评测集包含代表性问题、无答案问题、同义改写、跨文档问题、旧版本问题、权限边界和对抗性输入。将人工标注、规则检查和模型评审分开,并保存样本版本与评测配置。 ## 摄取、解析与切分 为每个 chunk 保留不可变 `source_id`、文档版本、标题路径、页码/段落、更新时间、租户/ACL 标签和内容 hash;引用必须能从 chunk 回到原文。解析失败、OCR 不确定、重复文档和过期版本要分别标记,不能静默进入索引。 切分依据文档结构、语义边界和目标上下文,而非固定字符数;保留少量可解释 overlap,避免把表格、代码、列表和标题拆散。对不同文档类型做小规模对照实验,记录 chunk 策略、embedding 模型、维度和版本,变更时可重现。 ## 召回与重排 根据语料和问题类型选择 dense、BM25 或 hybrid retrieval;对精确术语、编号、代码和专名不要只依赖 dense 相似度。先用 metadata/ACL 做硬过滤,再做相似度召回;不要让 prompt 中的文本决定权限。 用 MMR 或去重控制相似片段,必要时用 cross-encoder/模型重排,但设置候选数、超时、成本和降级策略。检索失败、无结果、低置信度和 provider 超时必须走不同路径;低质量上下文应触发澄清或拒答,而非编造。
Details
- Skill name
rag-implementation- Repository
- sandbaseai/workbuddy-skill
- Path
skills/rag-implementation/SKILL.md- License
- MIT
- Repo updated
- 8 September 2026
FAQ
What does the RAG Implementation skill do?
Use when designing or reviewing Retrieval-Augmented Generation systems, knowledge search, document Q&A, grounding, citations, or retrieval evaluation.
How do I install the RAG Implementation skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add sandbaseai/workbuddy-skill --skill rag-implementation. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is RAG Implementation popular?
It lives in sandbaseai/workbuddy-skill, which has 9 GitHub stars and 3 forks.
Related skills
Access Control Security Best Practices
9sandbaseai/workbuddy-skill
Design, review, implement, and verify least-privilege access controls across users, services, tenants, resources, and administrative workflows.
Accessibility Review
9sandbaseai/workbuddy-skill
Use when reviewing a web interface or interaction for semantic, keyboard, focus, screen-reader, ARIA, and contrast accessibility risks.
Acquire Codebase Knowledge
9sandbaseai/workbuddy-skill
Use when the user asks to map, document, or onboard into an existing codebase and needs evidence-backed architecture, structure, conventions, integrations, testing, and concerns documentation.
Skill Sunset
9sandbaseai/workbuddy-skill
Use when cleaning up, modernizing, retiring, or evaluating accumulated AGENTS.md, CLAUDE.md, or SKILL.md instructions; produce evidence-backed, reversible recommendations without automatically deleting domain or safety knowledge.
RAG Evaluation
9sandbaseai/workbuddy-skill
Use when designing, running, reviewing, or diagnosing evaluations for retrieval-augmented generation systems, including corpora, chunking, retrieval, reranking, context assembly, grounded answers, citations, refusals, latency, cost, and regressions.
Skill Supply Chain Audit
9sandbaseai/workbuddy-skill
Use when evaluating a third-party Skill, plugin, prompt, manifest, archive, MCP integration, or repository before installing, enabling, updating, publishing, or distributing it.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.