本文へスキップ
Skillpedia
エージェント280k · #208

ml-adoption-playbook

できること

このガイドは、まだAIを使っていないコンピュータープログラムに、人工知能(AI)を追加する方法を説明します。計画の立て方、データの準備、既存のコードへのAIの組み込み、そして最初のシンプルなモデルの作成までを示します。

使う場面

  • ✓プログラムにAIを追加したいとき。
  • ✓推薦モデル(レコメンダー)などの新しいAIモデルが、アプリケーション内でどのように動くかを計画するとき。
  • ✓AIコンポーネントを構築、学習、利用する作業を整理するとき。

スキルのリンク

https://github.com/affaan-m/ECC/blob/main/pi/core/skills/ml-adoption-playbook/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/affaan-m/ECC/blob/main/pi/core/skills/ml-adoption-playbook/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“ウェブサイトに推薦モデルを追加するにはどうすればよいですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

まずAIが問題を理解し、より簡単な解決策で済まないかを確認します。次に、必要なデータを整理し、AIがプログラムの他の部分と、全体を混乱させずにやり取りする方法を計画します。最後に、基本的なモデルを作成し、それを改善する方法を説明します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

ML Adoption Playbook

This skill provides an adaptive methodology for implementing machine learning models into existing software engineering projects. It bridges the gap between traditional SWE and MLOps by structuring how ML should be researched, decoupled, trained, and integrated.

When to Activate

  • A user asks to "add ML" or "add an algorithm" to their existing codebase.
  • Planning the integration of a new model (e.g., recommendation, classification, forecasting) into a non-ML application.
  • Structuring a workflow for an agent to build, train, and deploy an ML component adaptively.

Phase 1: Problem Framing & Feasibility

Before writing model code, establish the "why" and "how".

  • Heuristic Check: Ask the user if a simple heuristic (e.g., regex, rule-based sorting) could solve the problem faster. If yes, start there.
  • Metric Definition: Define what business metric the ML model is trying to improve (e.g., click-through rate, reduced latency).
  • Mistake Budget: Define what a "bad" prediction looks like and how the system should handle it.

Phase 2: Data Readiness

ML is useless without clean, accessible data.

  • Audit Data Sources: Identify where the training data lives. Is it a live database, a static CSV, or an API?
  • Data Contract: Establish a schema for the input data. What features are required? What happens if a feature is missing?
  • Leakage Prevention: Ensure the user's proposed data split does not accidentally leak future information into the training set (e.g., chronological splitting for time-series data).

Phase 3: Architectural Integration & Decoupling

Do not tightly couple model inference to core business logic.

  • API Boundary: Suggest placing the model behind an API endpoint (e.g., using fastapi-patterns or django-patterns) or a dedicated service class.
  • Fallback Mechanisms: Design a default state. If the model takes too long to respond or throws an error, the system must gracefully fall back to a hardcoded rule.
  • Feature Flags: Wrap the new ML inference call in a feature flag so it can be rolled out (or rolled back) safely.

Phase 4: Model Implementation & Training

Structure the code for reproducibility and iteration.

  • Start Simple: Build a baseline model first (e.g., a simple scikit-learn Logistic Regression or a barebones PyTorch linear layer).
  • Reproducibility: Apply pytorch-patterns or similar best practices: fix random seeds, make code device-agnostic, and explicitly document tensor/array shapes.
  • Automated Evidence: Require tests for the data transforms and inference schema. Do not accept a model without an evaluation script comparing it against the baseline.

Phase 5: Handoff to MLOps

Once the baseline model is integrated, shift focus to continuous operations.

  • Refer to mle-workflow: Guide the user toward setting up experiment tracking, model registries, and drift detection.
  • CI/CD: Add the model evaluation step to the existing CI pipeline to ensure future commits do not degrade model performance.

Iterative Agent Workflow

When assisting a user via this playbook, agents should:

  1. Ask clarifying questions to complete Phase 1 before proposing architectures.
  2. Draft a data contract in Phase 2 for user approval.
  3. Write the decoupling interface (API/Service) in Phase 3 before writing the training loop.
  4. Deliver a reproducible script in Phase 4 that trains the model and saves the artifact.
よくある質問

「ヒューリスティック」とは何ですか?

問題を素早く解くためのシンプルな解決策のことです。基本的なルールのようなもので、複雑なAIよりも簡単で効率的な場合があります。

「アーキテクチャの分離(デカップリング)」とは何ですか?

AIをプログラムの他の部分から切り離すことです。こうすることで、一方の変更がもう一方に影響しにくくなり、全体が整理され安定します。

「ベースラインモデル」とは何ですか?

まず動くものを得るために作る、最初のシンプルなAIモデルのことです。今後の比較や改善の出発点となります。

詳細

作者による元の説明

End-to-end methodology for AI agents and software engineers to add machine learning algorithms to existing non-ML codebases. Covers problem framing, data readiness, architectural decoupling, and baseline model integration. Use when adding a machine learning capability to a codebase that has none, from problem framing through a baseline model.

repo: affaan-m/ECC

人気

GitHubのスター
280k
ランキング
#208
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル