Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

domain-templates

БесплатноБез исполняемых скриптовНе проверен

Production RAG templates for five domains: customer-support, developer-docs, legal, medical, financial. Each covers corpus shape, chunking, embedding model…

claude-dev-suiteот claude-dev-suite★ 51 звезда на GitHub

Об этом скилле

Domain Templates

Each template specifies: corpus shape, chunking, embedding model, metadata schema, retrieval strategy, guardrails, eval criteria.

Template 1: Customer Support

Corpus Shape

  • Help articles (500-2000 words), macros, product FAQs, historical tickets, release notes.
  • High churn: content changes weekly.
  • Often multilingual.

Chunking

  • Help articles: Markdown header split, 800 chars, 150 overlap.
  • Historical tickets: per-turn; one chunk = (question + resolution) pair.
  • Release notes: per version, fixed-size 600 chars.

Embedding

  • text-embedding-3-small (cost-sensitive) or multilingual embed-multilingual-v3.0 (Cohere) if non-English.

Metadata Schema

{
  "article_id": str, "category": str, "product": str,
  "locale": str, "audience": Literal["customer","agent","internal"],
  "updated_at": datetime, "deprecated": bool,
  "resolution_success_rate": float  # for ticket chunks
}

Retrieval

  • Hybrid BM25 + dense; reranker.
  • Hard filter: deprecated=false, audience in allowed_audiences, locale in user_locales.
  • Soft bias: recency decay (half-life 180 days); boost resolution_success_rate for ticket chunks.

Guardrails

  • Hallucination tolerance: low. Answer grounded strictly in retrieved content; fall back to "contact support" if confidence low.
  • PII: strip customer names/emails from historical tickets before indexing.
  • Response style: short, action-oriented, always cite article.

Eval

  • Resolution rate (did the user stop asking?).
  • Deflection rate (% of queries handled without human).
  • Agent override rate (agent edits response before sending).
  • First-contact resolution within N turns.

Template 2: Developer Documentation

Corpus Shape

  • API docs (generated), tutorials, cookbook examples, SDK source code, GitHub issues.
  • Heterogeneous: prose + code + reference tables.

Chunking

  • Prose: Markdown header split, 1000 chars, 200 overlap.
  • Code: Language-aware splitter, 1500 chars; preserve whole functions/classes.
  • API reference: one chunk per endpoint or method.

Embedding

  • voyage-code-3 for code-heavy; text-embedding-3-large for mixed.
  • Separate indexes for code vs prose; route per query intent.

Metadata Schema

{
  "doc_id": str, "kind": Literal["prose","code","api","example"],
  "language": str, "library": str, "version": str,
  "section_path": list[str], "symbol": str | None,
  "updated_at": datetime
}

Retrieval

  • Query classifier: "how do I" -> prose+examples; "what does X return" -> api; "why does X fail" -> issues+examples.
  • Version-aware filter from user's installed version.
  • Code-aware reranker (cross-encoder trained on code-query pairs).

Guardrails

  • Answer must include a runnable code snippet when a how-to is requested.
  • Version lock: never return docs for a different major version unless explicitly asked.
  • Hallucination tolerance: zero on API signatures. Verify symbol exists in indexed API reference before emitting.

Eval

  • Code snippet runnability (execute in sandbox; pass/fail).
  • API signature accuracy (does returned signature match indexed reference?).
  • Link coverage (% answers that cite the canonical doc page).
  • Offline benchmark: SWE-bench-retrieval, CodeRAG-bench.

Template 3: Legal

Corpus Shape

  • Contracts, case law, statutes, internal memos, regulations.
  • Stable content; layered (statute -> regulation -> case interpretation).
  • Extreme precision needs; jurisdictional.

Chunking

  • Contracts / statutes: section/clause aware; proposition-based for atomic facts.
  • Case law: head-note + holding + reasoning separately indexed.
  • Preserve section numbering and hierarchy in metadata.

Embedding

  • Domain-tuned: Nomic Embed Legal, Voyage voyage-law-2, or fine-tune on case retrieval corpus.

Metadata Schema

{
  "doc_id": str, "kind": Literal["contract","statute","regulation","case","memo"],
  "jurisdiction": str, "effective_date": date, "superseded_by": str | None,
  "section_path": list[str], "clause_number": str | None,
  "citation": str, "parties": list[str] | None,
  "valid_from": date | None, "valid_to": date | None,
  "authority_score": float
}

Retrieval

  • Hybrid search mandatory; BM25 for exact statute lookups (e.g., "Section 11 USC 362").
  • Strict filters: jurisdiction, effective_date <= query_date, superseded_by is null.
  • Time-travel support (valid_at) for historical analysis.
  • Hierarchical: first retrieve statute, then regulations, then cases interpreting it.

Guardrails

  • Citations mandatory; every claim attributed.
  • Never paraphrase statute wording; quote verbatim.
  • "This is not legal advice" disclaimer.
  • Superseded content filter at query time, with explicit override.
  • PII: redact clients/parties if showing to other users.

Eval

  • Citation correctness (cited source actually supports claim) — human-graded.
  • Jurisdictional correctness.
  • Temporal correctness (statute version active at que
Полный SKILL.md на GitHub

Установить domain-templates в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Glob
Write
Edit

FAQ

Что делает скилл domain-templates?

Production RAG templates for five domains: customer-support, developer-docs, legal, medical, financial. Each covers corpus shape, chunking, embedding model choice, metadata schema, domain-specific guardrails (hallucination tolerance, PII, compliance), and evaluation criteria. USE WHEN: user mentions "RAG for support", "legal RAG", "medical RAG", "developer docs RAG", "financial RAG", "domain template RAG" DO NOT USE FOR: general architecture - use `rag-architecture`; evaluation methodology - use `rag-evaluation`; security specifics - use `rag-security`

Как установить скилл domain-templates?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл domain-templates запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить domain-templates с