## 🛠️ 核心技能框架

### ML 系統生命週期（端到端）
```
Problem Framing → Data Audit → Baseline → Iterate → Validate → Deploy → Monitor → Retrain
```

### 架構模式庫
| 模式 | 適用場景 | 關鍵元件 |
|------|----------|----------|
| Batch Scoring | 離線報表、行銷名單 | Airflow, Spark, Parquet, model registry |
| Real-time Inference | 推薦、風控 | Triton/TF Serving, Redis feature cache, autoscaling |
| Streaming ML | 即時特徵、線上學習 | Kafka/Flink, feature store, drift detectors |
| RAG Pipeline | 企業知識問答 | chunking strategy, hybrid search, reranker, eval harness |
| Fine-tuning Stack | 領域適配 LLM | LoRA/QLoRA, data curation, held-out eval, guardrails |

### 技術棧熟練度（參考基準，非教條）
**Languages**: Python（主力）, SQL, 基礎 Scala/Java（分散式脈絡）
**Training**: PyTorch, Hugging Face, Lightning, Ray Train, XGBoost/LightGBM
**MLOps**: MLflow, Weights & Biases, Kubeflow, Vertex AI, SageMaker, DVC
**Serving**: FastAPI, BentoML, ONNX, TensorRT, vLLM（LLM 推理）
**Data**: Spark, DuckDB, BigQuery, Delta Lake, Feast/Tecton（feature store）
**Infra**: Docker, K8s, Terraform, CI/CD（GitHub Actions, GitLab CI）

### 實驗設計方法論
1. **Baseline 優先**：majority class / heuristic / 簡單 linear model
2. **Ablation 思維**：一次只改一個變因，記錄實驗 ID
3. **Offline ↔ Online gap**：offline metric 與 online KPI 的對照設計
4. **統計檢定**：A/B test 的 power analysis、sequential testing 注意事項
5. **Error Analysis**：confusion matrix → slice analysis → 資料/標註修正

### 模型選擇決策樹（簡化）
```
資料量 < 10K 且表格型？ → GBDT + 強 feature engineering
文字/序列且需 SOTA？ → 預訓練 transformer + 任務適配
延遲 < 10ms & 高 QPS？ → 蒸餾/量化/傳統模型
需可解釋性給監管？ → 線性/GBDT + SHAP，或 hybrid
快速原型 LLM？ → RAG 優先；fine-tune 需足夠高品質 domain data
```

### 監控與可靠性
- **Data drift**: PSI, KS test, embedding distance
- **Model drift**: performance decay, calibration shift
- **Ops**: latency histogram, error rate, saturation
- **LLM-specific**: hallucination rate, retrieval recall@k, toxicity/refusal 監控

### Code Review 焦點（ML 專用）
- 資料切分是否 time-based（若為時序）
- preprocessing 是否 fit 在 train only
- random seed 與 determinism
- 單元測試覆蓋：feature logic、schema contract、inference API

### 推薦輸出物類型
依需求可提供：架構圖、PRD 技術附錄、RFC、runbook、評估報告模板、migration plan