🧠model-selection
- プラグイン
- sagemaker-ai
- ソース
- GitHub で見る ↗
説明
SageMaker Hub に問い合わせて、ユーザーのユースケースに適したベースモデルを選択します。 次のような場合に使用: - どのモデルを使えばよいか尋ねている - ベースモデルを選択または変更したい - モデル名やモデルファミリーに言及している(例: 「Llama」「Mistral」「Nova」など) - ベースモデルを評価したい なお、モデル名が既知であっても、Hub 上の正確なモデル ID を解決する必要があるため、常にこのスキルを有効にしてください。 利用可能なモデルを照会し、ベンチマーク結果とライセンス情報を提示したうえで、選択内容を確定します。
原文を表示
Selects a base model for the user's use case by querying SageMaker Hub. Use when the user asks which model to use, wants to select or change their base model, mentions a model name or family (e.g., "Llama", "Mistral", "Nova"), or wants to evaluate a base model — always activate even for known model names because the exact Hub model ID must be resolved. Queries available models, presents benchmarks and licenses, and confirms selection.
ユースケース
- ✓どのモデルを使えばよいか尋ねているとき
- ✓ベースモデルを選択または変更したいとき
- ✓モデル名やモデルファミリーに言及しているとき
- ✓ベースモデルを評価したいとき
本文(日本語訳)
モデル選択
ユーザーのユースケースに基づいて、ベースモデルの選択をガイドします。
使用するタイミング
次のような場合に使用:
- ユーザーがどのモデルを使うべきか質問している
- ユーザーがベースモデルを選択または変更したい
- ユーザーがモデル名やモデルファミリーに言及している(例: 「Llama」「Mistral」「Nova」)— Hub上の正確なモデルIDはまだ解決が必要
- ユーザーがファインチューニングを行うかどうかを決める前にベースモデルを評価したい
前提条件
use_case_spec.mdファイルが存在すること。 存在しない場合は、まず use-case-specification スキルを起動して生成してください。
ワークフロー
ステップ 1: リージョンの確認
以下を実行:
python -c "import boto3; print(boto3.session.Session().region_name)"
None→ STOP。 ユーザーに次のように伝える: 「export AWS_DEFAULT_REGION=us-west-2またはaws configureでリージョンを設定してください。」- 設定済み → REGIONをコンテキストに保存し、次へ進む。
ステップ 2: Hubの探索
-
aws___call_awsツールを使って SageMaker のListHubsAPI を呼び出し、ユーザーのリージョンで利用可能なすべての SageMaker Hub を一覧表示する。 -
結果から、
HubDescriptionに「AI Registry」を含む Hub を除外する — これらには JumpStart モデルが含まれていない。 -
残った Hub が対象候補となる(例:
SageMakerPublicHubおよびプライベート Hub)。 -
対象候補が1つだけの場合は、自動的にそれを使用する — ユーザーへの確認は不要。
-
対象候補が複数ある場合は、一覧をユーザーに提示し、どれを使用するか尋ねる。例:
以下のモデル Hub が見つかりました: - SageMakerPublicHub — SageMaker Public Hub - Private-Hub-XYZ — プライベート Hub モデル どの Hub を使用しますか? -
選択された Hub 名を以降のステップで使用するために保存する。
ステップ 3: ベースモデルの選択
まず、python model-selection/scripts/get_model_names.py <hub-name> を実行して、利用可能なすべての SageMaker Hub モデル名を取得する。
推奨を行う前に、利用可能なすべてのモデルをライセンス情報とともにユーザーに提示する。
references/model-licenses.md とモデル一覧を照合し、各モデルを <モデル名> - [<ライセンス>](<URL>) の形式で表示する。
例: 「Qwen3-4B - Apache 2.0」
会話のコンテキストや計画ファイルからユーザーが使用したいモデルがすでに判明している場合は、そのモデルが一覧に含まれていることを確認し、ライセンスを表示してから次へ進む。
そうでない場合は、references/model-selection.md の手順に従ってユーザーのモデル選択をサポートする。
重要: モデル選択のサポート中は、利用可能なモデルの一覧を必ず記憶しておくこと。ユーザーが利用できないモデルを推奨しないよう注意すること。
ステップ 4: 選択の確認
以下のサマリーをユーザーに提示する:
選択内容:
- ベースモデル: [モデル名]
このモデルで進めてよいか確認する。
参考ファイル
references/model-selection.md— モデル選択の手順およびベンチマークの説明references/model-licenses.md— モデル選択時に表示するためのモデルライセンス情報
原文(English)を表示
Model Selection
Guides the user through selecting a base model based on their use case.
When to Use
- User asks which model to use
- User wants to select or change their base model
- User mentions a model name or family (e.g., "Llama", "Mistral", "Nova") — the exact Hub model ID still needs to be resolved
- User wants to evaluate a base model before deciding whether to finetune
Prerequisites
- A
use_case_spec.mdfile exists. If not, activate the use-case-specification skill to generate it first.
Workflow
Step 1: Check Region
Run:
python -c "import boto3; print(boto3.session.Session().region_name)"
None→ STOP. Tell user: "Set your region viaexport AWS_DEFAULT_REGION=us-west-2oraws configure."- Set → store REGION in context, continue.
Step 2: Discover Hub
-
List all available SageMaker Hubs in the user's region by calling the SageMaker
ListHubsAPI using theaws___call_awstool. -
From the results, filter out any hub whose
HubDescriptioncontains "AI Registry" — these do not contain JumpStart models. -
The remaining hubs are eligible (e.g.,
SageMakerPublicHuband any private hubs). -
If exactly one eligible hub exists, use it automatically — do not ask the user.
-
If multiple eligible hubs exist, present them to the user and ask which one to use. Example:
I found the following model hubs: - SageMakerPublicHub — SageMaker Public Hub - Private-Hub-XYZ — Private Hub models Which hub would you like to use? -
Store the selected hub name for use in subsequent steps.
Step 3: Select Base Model
First, retrieve all available SageMaker Hub model names by running: python model-selection/scripts/get_model_names.py <hub-name>.
Present all available models to the user with their licenses before making any recommendations. Cross-reference the model list with references/model-licenses.md and display each as <model name> - [<license>](<url>). For example: "Qwen3-4B - Apache 2.0"
If you already know the model the user wants to use (from conversation context or planning files), confirm that it's in the list, display its license, and move on. Otherwise, help the user pick a model following the instructions in references/model-selection.md.
Important: Make sure to remember this list of available models when helping with model selection. Don't recommend a model that's not available to the user.
Step 4: Confirm Selection
Present a summary to the user:
Here's what we've selected:
- Base model: [model name]
Ask if they'd like to proceed with this model.
References
references/model-selection.md— Model selection instructions and benchmark descriptionsreferences/model-licenses.md— Model license information for display during model selection
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。