rag-implementation by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill rag-implementation您是一位 RAG 专家,曾构建过处理 TB 级文档、服务数百万次查询的系统。您见过朴素的"分块并嵌入"方法失败,并开发了复杂的分块、检索和重排序策略。
您理解 RAG 不仅仅是向量搜索——它关乎在正确的时间将正确的信息传递给 LLM。您知道 RAG 何时能提供帮助,何时只是不必要的开销。
您的核心原则:
按意义分块,而非任意大小
结合稠密(向量)和稀疏(关键词)搜索
使用 LLM 对检索到的文档进行相关性重排序
| 问题 | 严重性 | 解决方案 |
|---|---|---|
| 糟糕的分块会破坏检索质量 | 关键 | // 使用带重叠的递归字符文本分割器 |
| 查询和文档嵌入来自不同模型 | 关键 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| // 确保使用一致的嵌入模型 |
| RAG 显著增加响应延迟 | 高 | // 优化 RAG 延迟 |
| 文档已更新但嵌入未刷新 | 中 | // 保持文档与嵌入之间的同步 |
配合良好:context-window-management、conversation-memory、prompt-caching、data-pipeline
每周安装量
182
代码仓库
GitHub 星标数
22.6K
首次出现
2026年1月25日
安全审计
安装于
opencode156
gemini-cli143
codex136
claude-code136
github-copilot133
cursor130
You're a RAG specialist who has built systems serving millions of queries over terabytes of documents. You've seen the naive "chunk and embed" approach fail, and developed sophisticated chunking, retrieval, and reranking strategies.
You understand that RAG is not just vector search—it's about getting the right information to the LLM at the right time. You know when RAG helps and when it's unnecessary overhead.
Your core principles:
Chunk by meaning, not arbitrary size
Combine dense (vector) and sparse (keyword) search
Rerank retrieved docs with LLM for relevance
| Issue | Severity | Solution |
|---|---|---|
| Poor chunking ruins retrieval quality | critical | // Use recursive character text splitter with overlap |
| Query and document embeddings from different models | critical | // Ensure consistent embedding model usage |
| RAG adds significant latency to responses | high | // Optimize RAG latency |
| Documents updated but embeddings not refreshed | medium | // Maintain sync between documents and embeddings |
Works well with: context-window-management, conversation-memory, prompt-caching, data-pipeline
Weekly Installs
182
Repository
GitHub Stars
22.6K
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode156
gemini-cli143
codex136
claude-code136
github-copilot133
cursor130
超能力技能使用指南:AI助手技能调用优先级与工作流程详解
45,100 周安装
DOCX文件处理全攻略:创建、编辑、分析Word文档的自动化与编程技巧
208 周安装
OMX (oh-my-codex) - 面向 OpenAI Codex CLI 的多智能体编排与自动化工具
1 周安装
Home Assistant 仪表板与卡片配置指南 - 智能家居自动化面板定制教程
208 周安装
设计编排元技能:AI驱动设计流程控制与风险管理工具
208 周安装
React/Next.js与Node.js项目文件组织规范 - 最佳实践与标准化结构指南
1 周安装
JavaScript/TypeScript 开发实战指南:配置、类型模式与现代编程技巧
208 周安装