llm-architect
大規模言語モデルのシステム設計、展開、最適化、運用インフラを、性能・費用対効果・安全性を考慮して構築するSkill。
📜 元の英語説明(参考)
Use when user needs LLM system architecture, model deployment, optimization strategies, and production serving infrastructure. Designs scalable large language model applications with focus on performance, cost efficiency, and safety.
🇯🇵 日本人クリエイター向け解説
大規模言語モデルのシステム設計、展開、最適化、運用インフラを、性能・費用対効果・安全性を考慮して構築するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] llm-architect
LLMアーキテクト
目的
大規模言語モデル(LLM)アプリケーションを大規模に設計、デプロイ、最適化するための、専門的なLLMシステムアーキテクチャを提供します。モデル選択、RAG(Retrieval Augmented Generation)パイプライン、ファインチューニング戦略、サービングインフラストラクチャ、コスト最適化、および本番LLMシステムの安全ガードレールに特化しています。
使用場面
- 要件定義から本番環境まで、エンドツーエンドのLLMシステムを設計する場合
- 特定のユースケース向けにモデルとサービングインフラストラクチャを選択する場合
- RAG(Retrieval Augmented Generation)パイプラインを実装する場合
- 品質しきい値を維持しながらLLMコストを最適化する場合
- 安全ガードレールとコンプライアンスメカニズムを構築する場合
- ファインチューニング、RAG、プロンプトエンジニアリングの戦略を計画する場合
- 高スループットアプリケーション向けにLLM推論をスケールする場合
クイックスタート
このスキルを呼び出すのは、次の場合です。
- 要件定義から本番環境まで、エンドツーエンドのLLMシステムを設計する場合
- 特定のユースケース向けにモデルとサービングインフラストラクチャを選択する場合
- RAG(Retrieval Augmented Generation)パイプラインを実装する場合
- 品質しきい値を維持しながらLLMコストを最適化する場合
- 安全ガードレールとコンプライアンスメカニズムを構築する場合
呼び出さないのは、次の場合です。
- シンプルなAPI統合が存在する場合(代わりにbackend-developerを使用してください)
- アーキテクチャの決定なしにプロンプトエンジニアリングのみが必要な場合
- ゼロから基盤モデルをトレーニングする場合(ほとんどの場合、間違ったアプローチです)
- 言語モデルとは無関係の一般的なMLタスクの場合(ml-engineerを使用してください)
意思決定フレームワーク
モデル選択クイックガイド
| 要件 | 推奨アプローチ |
|---|---|
| レイテンシ <100ms | 小規模なファインチューニングモデル (7B 量子化) |
| レイテンシ <2s、予算無制限 | Claude 3 Opus / GPT-4 |
| レイテンシ <2s、ドメイン固有 | Claude 3 Sonnet ファインチューニング |
| レイテンシ <2s、コスト重視 | Claude 3 Haiku |
| バッチ/非同期許容 | バッチAPI、最安値ティア |
RAG vs ファインチューニング意思決定ツリー
LLMの動作をカスタマイズする必要がありますか?
│
├─ ドメイン固有の知識が必要ですか?
│ ├─ 知識は頻繁に変化しますか?
│ │ └─ RAG (Retrieval Augmented Generation)
│ └─ 知識は静的ですか?
│ └─ ファインチューニング または RAG (両方をテスト)
│
├─ 特定の出力形式/スタイルが必要ですか?
│ ├─ プロンプトで記述できますか?
│ │ └─ プロンプトエンジニアリング (最初に試す)
│ └─ 形式がプロンプトには複雑すぎますか?
│ └─ ファインチューニング
│
└─ レイテンシ <100ms が必要ですか?
└─ ファインチューニングされた小型モデル (7B-13B)
アーキテクチャパターン
[クライアント] → [APIゲートウェイ + レート制限]
↓
[リクエストルーター]
(意図/複雑度でルーティング)
↓
┌────────┴────────┐
↓ ↓
[高速モデル] [強力モデル]
(Haiku/小型) (Sonnet/大型)
↓ ↓
[キャッシュ層] ← [レスポンスアグリゲーター]
↓
[ロギング & モニタリング]
↓
[クライアントへのレスポンス]
コアワークフロー:LLMシステムの設計
1. 要件収集
次の質問をしてください。
- レイテンシ: P95応答時間の要件は何ですか?
- スケール: 予想される1日あたりのリクエスト数と成長予測は?
- 精度: 許容可能な最低品質は何ですか?(測定可能な指標)
- コスト: 予算の制約はありますか?(1リクエストあたりまたは1ヶ月あたり)
- データ: 評価用の既存データセットはありますか?機密レベルは?
- コンプライアンス: 規制要件はありますか?(HIPAA、GDPR、SOC2など)
2. モデル選択
def select_model(requirements):
if requirements.latency_p95 < 100: # ミリ秒
if requirements.task_complexity == "simple":
return "llama2-7b-finetune"
else:
return "mistral-7b-quantized"
elif requirements.latency_p95 < 2000:
if requirements.budget == "unlimited":
return "claude-3-opus"
elif requirements.domain_specific:
return "claude-3-sonnet-finetuned"
else:
return "claude-3-haiku"
else: # バッチ/非同期許容
if requirements.accuracy_critical:
return "gpt-4-with-ensemble"
else:
return "batch-api-cheapest-tier"
3. プロトタイプと評価
# 評価データセットでベンチマークを実行
python scripts/evaluate_model.py \
--model claude-3-sonnet \
--dataset data/eval_1000_examples.jsonl \
--metrics accuracy,latency,cost
# 予想される出力:
# Accuracy: 94.3%
# P95 Latency: 1,245ms
# Cost per 1K requests: $2.15
4. イテレーションチェックリスト
- [ ] レイテンシP95は要件を満たしていますか? いいえの場合 → サービングを最適化(量子化、キャッシング)
- [ ] 精度はしきい値を満たしていますか? いいえの場合 → プロンプトの改善、ファインチューニング、またはモデルのアップグレード
- [ ] コストは予算内ですか? いいえの場合 → 積極的なキャッシング、より小さなモデルのルーティング、バッチ処理
- [ ] 安全ガードレールはテスト済みですか? いいえの場合 → コンテンツフィルター、PII検出を追加
- [ ] モニタリングダッシュボードは稼働中ですか? いいえの場合 → Prometheus + Grafanaをセットアップ
- [ ] ランブックは文書化されていますか? いいえの場合 → 一般的な障害と修正を文書化
コスト最適化戦略
| 戦略 | 節約率 | 使用場面 |
|---|---|---|
| セマンティックキャッシング | 40-80% | 60%以上の類似クエリ |
| マルチモデルルーティング | 30-50% | 複雑度が混在するクエリ |
| プロンプト圧縮 | 10-20% | 長いコンテキスト入力 |
| バッチ処理 | 20-40% | 非同期許容ワークロード |
| 小規模モデルカスケード | 40-60% | 最初にシンプルなクエリ |
安全チェックリスト
- [ ] 敵対的サンプルに対してコンテンツフィルタリングがテスト済みであること
- [ ] PII検出と匿名化が検証済みであること
- [ ] プロンプトインジェクション防御が導入されていること
- [ ] 出力検証ルールが実装されていること
- [ ] すべてのリクエストに対して監査ロギングが設定されていること
- [ ] コンプライアンス要件が文書化され、検証済みであること
レッドフラグ - エスカレーションすべき時
| 観測事項 | アクション |
|---|---|
| プロンプトの反復後も精度 <80% | ファインチューニングを検討 |
| レイテンシが要件の2倍 | インフラストラクチャを見直し |
| コストが予算の2倍超 | 積極的なキャッシング/ルーティング |
| ハルシネーション率 >5% | RAGまたはより強力なガードレールを追加 |
| 安全バイパスが検出された | 即座にセキュリティレビュー |
クイックリファレンス:パフォーマンス目標
| メトリック | 目標 | 危機的 |
|---|---|---|
| P95 レイテンシ | <要件の2倍 | <要件の3倍 |
| 精度 | >90% |
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
LLM Architect
Purpose
Provides expert large language model system architecture for designing, deploying, and optimizing LLM applications at scale. Specializes in model selection, RAG (Retrieval Augmented Generation) pipelines, fine-tuning strategies, serving infrastructure, cost optimization, and safety guardrails for production LLM systems.
When to Use
- Designing end-to-end LLM systems from requirements to production
- Selecting models and serving infrastructure for specific use cases
- Implementing RAG (Retrieval Augmented Generation) pipelines
- Optimizing LLM costs while maintaining quality thresholds
- Building safety guardrails and compliance mechanisms
- Planning fine-tuning vs RAG vs prompt engineering strategies
- Scaling LLM inference for high-throughput applications
Quick Start
Invoke this skill when:
- Designing end-to-end LLM systems from requirements to production
- Selecting models and serving infrastructure for specific use cases
- Implementing RAG (Retrieval Augmented Generation) pipelines
- Optimizing LLM costs while maintaining quality thresholds
- Building safety guardrails and compliance mechanisms
Do NOT invoke when:
- Simple API integration exists (use backend-developer instead)
- Only prompt engineering needed without architecture decisions
- Training foundation models from scratch (almost always wrong approach)
- Generic ML tasks unrelated to language models (use ml-engineer)
Decision Framework
Model Selection Quick Guide
| Requirement | Recommended Approach |
|---|---|
| Latency <100ms | Small fine-tuned model (7B quantized) |
| Latency <2s, budget unlimited | Claude 3 Opus / GPT-4 |
| Latency <2s, domain-specific | Claude 3 Sonnet fine-tuned |
| Latency <2s, cost-sensitive | Claude 3 Haiku |
| Batch/async acceptable | Batch API, cheapest tier |
RAG vs Fine-Tuning Decision Tree
Need to customize LLM behavior?
│
├─ Need domain-specific knowledge?
│ ├─ Knowledge changes frequently?
│ │ └─ RAG (Retrieval Augmented Generation)
│ └─ Knowledge is static?
│ └─ Fine-tuning OR RAG (test both)
│
├─ Need specific output format/style?
│ ├─ Can describe in prompt?
│ │ └─ Prompt engineering (try first)
│ └─ Format too complex for prompt?
│ └─ Fine-tuning
│
└─ Need latency <100ms?
└─ Fine-tuned small model (7B-13B)
Architecture Pattern
[Client] → [API Gateway + Rate Limiting]
↓
[Request Router]
(Route by intent/complexity)
↓
┌────────┴────────┐
↓ ↓
[Fast Model] [Powerful Model]
(Haiku/Small) (Sonnet/Large)
↓ ↓
[Cache Layer] ← [Response Aggregator]
↓
[Logging & Monitoring]
↓
[Response to Client]
Core Workflow: Design LLM System
1. Requirements Gathering
Ask these questions:
- Latency: What's the P95 response time requirement?
- Scale: Expected requests/day and growth trajectory?
- Accuracy: What's the minimum acceptable quality? (measurable metric)
- Cost: Budget constraints? ($/request or $/month)
- Data: Existing datasets for evaluation? Sensitivity level?
- Compliance: Regulatory requirements? (HIPAA, GDPR, SOC2, etc.)
2. Model Selection
def select_model(requirements):
if requirements.latency_p95 < 100: # milliseconds
if requirements.task_complexity == "simple":
return "llama2-7b-finetune"
else:
return "mistral-7b-quantized"
elif requirements.latency_p95 < 2000:
if requirements.budget == "unlimited":
return "claude-3-opus"
elif requirements.domain_specific:
return "claude-3-sonnet-finetuned"
else:
return "claude-3-haiku"
else: # Batch/async acceptable
if requirements.accuracy_critical:
return "gpt-4-with-ensemble"
else:
return "batch-api-cheapest-tier"
3. Prototype & Evaluate
# Run benchmark on eval dataset
python scripts/evaluate_model.py \
--model claude-3-sonnet \
--dataset data/eval_1000_examples.jsonl \
--metrics accuracy,latency,cost
# Expected output:
# Accuracy: 94.3%
# P95 Latency: 1,245ms
# Cost per 1K requests: $2.15
4. Iteration Checklist
- [ ] Latency P95 meets requirement? If no → optimize serving (quantization, caching)
- [ ] Accuracy meets threshold? If no → improve prompts, fine-tune, or upgrade model
- [ ] Cost within budget? If no → aggressive caching, smaller model routing, batching
- [ ] Safety guardrails tested? If no → add content filters, PII detection
- [ ] Monitoring dashboards live? If no → set up Prometheus + Grafana
- [ ] Runbook documented? If no → document common failures and fixes
Cost Optimization Strategies
| Strategy | Savings | When to Use |
|---|---|---|
| Semantic caching | 40-80% | 60%+ similar queries |
| Multi-model routing | 30-50% | Mixed complexity queries |
| Prompt compression | 10-20% | Long context inputs |
| Batching | 20-40% | Async-tolerant workloads |
| Smaller model cascade | 40-60% | Simple queries first |
Safety Checklist
- [ ] Content filtering tested against adversarial examples
- [ ] PII detection and redaction validated
- [ ] Prompt injection defenses in place
- [ ] Output validation rules implemented
- [ ] Audit logging configured for all requests
- [ ] Compliance requirements documented and validated
Red Flags - When to Escalate
| Observation | Action |
|---|---|
| Accuracy <80% after prompt iteration | Consider fine-tuning |
| Latency 2x requirement | Review infrastructure |
| Cost >2x budget | Aggressive caching/routing |
| Hallucination rate >5% | Add RAG or stronger guardrails |
| Safety bypass detected | Immediate security review |
Quick Reference: Performance Targets
| Metric | Target | Critical |
|---|---|---|
| P95 Latency | <2x requirement | <3x requirement |
| Accuracy | >90% | >80% |
| Cache Hit Rate | >60% | >40% |
| Error Rate | <1% | <5% |
| Cost/1K requests | Within budget | <150% budget |
Additional Resources
-
Detailed Technical Reference: See REFERENCE.md
- RAG implementation workflow
- Semantic caching patterns
- Deployment configurations
-
Code Examples & Patterns: See EXAMPLES.md
- Anti-patterns (fine-tuning when prompting suffices, no fallback)
- Quality checklist for LLM systems
- Resilient LLM call patterns