rag-implementation
建立接地 RAG 管道
您需要從私人文件和變動資料中獲得準確的答案。本技能說明 RAG 元件和檢索模式,以透過來源來接地回應。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「rag-implementation」。 Outline a RAG pipeline for internal policies with citations.
預期結果:
- Load policy documents from a controlled folder and split into 800 token chunks
- Create embeddings using text-embedding-ada-002 and store them in a vector database
- Use hybrid retrieval combining BM25 and semantic search, then rerank the top 20 results
- Answer with citations that reference source files and section numbers
正在使用「rag-implementation」。 How do I choose chunk size for technical documentation?
預期結果:
- Use 500-1000 tokens with 10-20% overlap for most documentation
- Smaller chunks (400 tokens) improve retrieval precision for specific queries
- Larger chunks (1500+ tokens) work better for narrative content requiring context
- Add metadata like source file and section headers to enable filtering
正在使用「rag-implementation」。 What vector database should I use for a small team?
預期結果:
- Chroma for local testing and prototypes - simple setup, no infrastructure
- Pinecone for managed service with automatic scaling and minimal ops
- Weaviate for hybrid search needs combining vector and keyword matching
- Consider FAISS for complete offline deployment with no network required
安全審計
低風險This is a documentation-only skill containing Markdown guides with Python code examples. No executable scripts, network calls, or file access capabilities exist in the skill itself. All static findings are false positives from the scanner misinterpreting documentation patterns as security risks. Code examples demonstrate typical RAG patterns using LangChain APIs. No obfuscation, persistence mechanisms, or malicious patterns detected.
風險因素
🌐 網路存取 (3)
⚙️ 外部命令 (37)
🔑 環境變數 (1)
品質評分
你能建構什麼
設計 RAG 聊天機器人
規劃一個檢索管道,使用內部文件的引用來接地答案。
評估檢索品質
定義指標和測試案例以衡量準確性、接地性和檢索品質。
選擇向量儲存
比較向量資料庫選項,並選擇符合規模和部署需求的方案。
試試這些提示
為文件問答應用建立一個簡單的 RAG 計劃。包括資料攝取、分塊、嵌入、向量儲存選擇和檢索鏈。
設計使用密集檢索和 BM25 的混合檢索策略。指定 k 值、權重以及何時進行重新排序。
提出使用交叉編碼器或 MMR 的重新排序方法。說明候選大小和選擇標準。
為 RAG 系統草擬評估計劃。包括準確性、檢索品質、接地性指標和測試案例結構。
最佳實務
- 使用元資料進行過濾和除錯。
- 將混合檢索與重新排序相結合以獲得最佳結果。
- 在評估期間追蹤檢索指標。
避免
- 索引文件時沒有分塊重疊。
- 在使用者面向的答案中跳過引用。
- 對關鍵字密集的查詢僅使用密集檢索。
常見問題
這支援哪些平台
主要限制是什麼
如何將其整合到我的應用中
它會存取我的資料嗎
如果檢索品質很低怎麼辦
這與基本搜索有何不同
開發者詳情
作者
wshobson授權
MIT
儲存庫
https://github.com/wshobson/agents/tree/main/plugins/llm-application-dev/skills/rag-implementation引用
main
檔案結構
📄 SKILL.md