一键导入
rag-design
Design a RAG architecture — chunking, embedding, retrieval pattern, re-ranking, and observability
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Design a RAG architecture — chunking, embedding, retrieval pattern, re-ranking, and observability
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Audit a Google ADK tool file against the five known gotchas (DI params, thin wrappers, _j helper, async-wrap blocking calls, httpx context manager) before they bite in production
After creating an ADR, run the cross-referencing checklist — update README Artifacts table, add Related Decisions section to source proposal, cross-link sibling ADRs to each other
Mid-task durability — dump current state and a next-step file before context fills, so the next session resumes without re-deriving where you were
Generate and verify a pre-demo checklist for an ADK/agent project — env vars, GCP auth, embedding swap, ngrok/Slack wiring, dry-run, tests, real-vs-synthetic data
Scan a project's docs (README, CLAUDE.md, ADRs, runbooks) for inconsistent project naming, scope, or framing — catches the "README says retail, CLAUDE.md still says Kroger" class of bug
Refresh a project's status — derive current state from code/tests/git, regenerate the project's status memory entry and (if requested) a status section in the README
| name | rag-design |
| description | Design a RAG architecture — chunking, embedding, retrieval pattern, re-ranking, and observability |
User runs /rag-design followed by a description of their data and use case, or runs it alone.
| Corpus Type | Recommended Strategy |
|---|---|
| Long-form docs (PDFs, reports) | Recursive character splitting, 512–1024 tokens, 10–20% overlap |
| Structured data (tables, CSVs) | Row-level or semantic table chunking; do NOT split mid-row |
| Code | Function/class-level splitting; preserve imports in context |
| Conversations / transcripts | Turn-level or fixed-window with speaker labels preserved |
| Mixed | Hybrid — apply type detection before chunking |
| Constraint | Recommendation |
|---|---|
| On-prem / data residency | sentence-transformers (all-mpnet-base-v2 or BGE-M3) |
| Cloud / quality priority | OpenAI text-embedding-3-large or Google text-embedding-004 |
| Multilingual | BGE-M3 or multilingual-e5-large |
| Low latency | text-embedding-3-small or bge-small-en |
cross-encoder/ms-marco-MiniLM-L-6-v2 (fast) or Cohere Rerank (cloud)Corpus: [description]
Query Pattern: [description]
Latency Budget: [Xms end-to-end]
Priority: [Accuracy / Speed / Cost]
Recommended strategy + rationale. Flag if corpus needs pre-processing before chunking.
Model recommendation + hosting mode (local vs. API). Note token limits and batch costs.
Recommendation from: pgvector, Pinecone, Weaviate, Qdrant, ChromaDB, Vertex AI Vector Search. Include: index type (HNSW vs IVF), namespace/tenant strategy, update/upsert pattern.
Dense / sparse / hybrid recommendation with top-k and score threshold.
Whether to include, which model, and the top-k to pass downstream.
Key guidance: cite sources, handle "not found" gracefully, set context window budget.
Metrics to track: retrieval recall@k, faithfulness, latency per stage, chunk hit rate.
| Risk | Severity | Mitigation |
|---|
Decisions that should be captured (embedding model, vector store, retrieval pattern).