$npx -y skills add awslabs/agent-plugins --skill model-selectionSelects 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 e
| 1 | # Model Selection |
| 2 | |
| 3 | Guides the user through selecting a base model based on their use case. |
| 4 | |
| 5 | ## When to Use |
| 6 | |
| 7 | - User asks which model to use |
| 8 | - User wants to select or change their base model |
| 9 | - User mentions a model name or family (e.g., "Llama", "Mistral", "Nova") — the exact Hub model ID still needs to be resolved |
| 10 | - User wants to evaluate a base model before deciding whether to finetune |
| 11 | |
| 12 | ## Prerequisites |
| 13 | |
| 14 | - A `use_case_spec.md` file exists. If not, activate the use-case-specification skill to generate it first. |
| 15 | |
| 16 | ## Workflow |
| 17 | |
| 18 | ### Step 1: Check Region |
| 19 | |
| 20 | Run: |
| 21 | |
| 22 | ``` |
| 23 | python -c "import boto3; print(boto3.session.Session().region_name)" |
| 24 | ``` |
| 25 | |
| 26 | - `None` → STOP. Tell user: "Set your region via `export AWS_DEFAULT_REGION=us-west-2` or `aws configure`." |
| 27 | - Set → store REGION in context, continue. |
| 28 | |
| 29 | ### Step 2: Discover Hub |
| 30 | |
| 31 | 1. List all available SageMaker Hubs in the user's region by calling the SageMaker `ListHubs` API using the `aws___call_aws` tool. |
| 32 | 2. From the results, filter out any hub whose `HubDescription` contains "AI Registry" — these do not contain JumpStart models. |
| 33 | 3. The remaining hubs are eligible (e.g., `SageMakerPublicHub` and any private hubs). |
| 34 | 4. If exactly one eligible hub exists, use it automatically — do not ask the user. |
| 35 | 5. If multiple eligible hubs exist, present them to the user and ask which one to use. Example: |
| 36 | |
| 37 | ``` |
| 38 | I found the following model hubs: |
| 39 | - SageMakerPublicHub — SageMaker Public Hub |
| 40 | - Private-Hub-XYZ — Private Hub models |
| 41 | Which hub would you like to use? |
| 42 | ``` |
| 43 | |
| 44 | 6. Store the selected hub name for use in subsequent steps. |
| 45 | |
| 46 | ### Step 3: Select Base Model |
| 47 | |
| 48 | First, retrieve all available SageMaker Hub model names by running: `python model-selection/scripts/get_model_names.py <hub-name>`. |
| 49 | |
| 50 | 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](https://huggingface.co/Qwen/Qwen3-4B/blob/main/LICENSE)" |
| 51 | |
| 52 | 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`. |
| 53 | **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. |
| 54 | |
| 55 | ### Step 4: Confirm Selection |
| 56 | |
| 57 | Present a summary to the user: |
| 58 | |
| 59 | ``` |
| 60 | Here's what we've selected: |
| 61 | - Base model: [model name] |
| 62 | ``` |
| 63 | |
| 64 | Ask if they'd like to proceed with this model. |
| 65 | |
| 66 | ## References |
| 67 | |
| 68 | - `references/model-selection.md` — Model selection instructions and benchmark descriptions |
| 69 | - `references/model-licenses.md` — Model license information for display during model selection |