Model Selection logo

Model Selection

Community
nimadorostkar
model-selection

Use when choosing which LLM to use for a task. Covers matching capability to task, cost and latency trade-offs, routing between models, benchmark skepticism, and evaluating on your own data. Trigger on "which model should i use for this", "is the new model worth switching to", "route easy requests to a cheaper model". Do not use for building the evaluation set itself — see the llm-evaluation skill; for cutting token spend, see the llm-cost-optimization skill.

Overview

Publishernimadorostkar
RepositoryClaude-Skills-collection
Skill namemodel-selection
Stars
34
Forks
4
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by nimadorostkar on GitHub. Read the source before you install it.

Installation

Install the Model Selection AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/model-selection
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/ai/model-selection .claude/skills/model-selection
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Model Selection in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Model Selection on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Model Selection is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Model Selection

Purpose

Choose the model that meets the task's requirements at the lowest cost and latency. Most production LLM features run on a model several times more expensive than the task requires, because nobody measured the cheaper one.

When to Use

  • Choosing a model for a new feature.
  • Reducing the cost or latency of an existing feature.
  • Evaluating whether a newly released model is worth migrating to.
  • Designing a routing strategy across several models.

Capabilities

  • Task-to-capability matching.
  • Cost and latency modeling at real volume.
  • Routing: cheap model first, escalate on difficulty.
  • Benchmark interpretation and its limits.
  • Migration and re-evaluation.

Inputs

  • The task, and the accuracy it genuinely requires.
  • Volume, latency budget, and cost budget.
  • An evaluation set — without one, this is guesswork.

Outputs

  • A model choice justified by measurement on your data.
  • A cost and latency projection at real volume.
  • A routing strategy, where one is warranted.

Workflow

  1. Start with the cheapest plausible model — Not the best one. Measure it on your evaluation set. Escalate only if it fails, and only as far as necessary.
  2. Measure on your data, not on benchmarks — A model that leads on MMLU may be worse at your specific extraction task. Public benchmarks measure general capability, and your task is not general.
  3. Model the cost at real volume — A per-call cost difference that looks trivial becomes the dominant line item at a million calls a month. Do the arithmetic before choosing.
  4. Consider routing — Send everything to a small model; escalate the cases it flags as low-confidence to a larger one. This frequently captures most of the accuracy at a fraction of the cost.
  5. Re-evaluate on model updates — Provider models change under the same name. A prompt tuned six months ago on a model that has since been updated may no longer be optimal.

Best Practices

  • The most common mistake is defaulting to the most capable model for everything. Classification, extraction, and routing tasks are usually solved by a small model at a tenth of the cost and a fifth of the latency.
  • Public benchmarks are contaminated and gamed. They are a rough capability ordering, not a prediction of performance on your task.
  • Latency matters more than cost for user-facing features, and cost matters more than latency for batch processing. Optimize for the one that binds.
  • A cheaper model with better prompting often beats a more expensive model with worse prompting. Improve the prompt before upgrading the model.
  • Test the failure mode, not just the accuracy. A small model that fails loudly is safer than a large one that fails plausibly.
  • Do not hard-code the model name across the codebase. Configure it, so migration is a config change rather than a search-and-replace.

Examples

Measuring rather than assuming:

text
Task: extract structured fields from support emails. 800,000/month.

Model         Accuracy   p95 latency   Cost/1k calls   Monthly cost
-----------   --------   -----------   -------------   ------------
Small          91.2%        340ms          $0.42            $336
Medium         96.8%        890ms          $3.10          $2,480
Large          97.4%       2,100ms        $15.00         $12,000

The large model buys 0.6 accuracy points over the medium for 5x the cost and
2.4x the latency. It is not a serious candidate.

The real question is whether 91.2% is sufficient. It is not — the failures
concentrate on emails with attachments and multi-issue threads.

Routing solution:
  - Small model handles everything, and returns a confidence score.
  - The 14% of cases below the confidence threshold escalate to medium.

  Effective accuracy:  96.5%   (within 0.3 points of medium-for-everything)
  Monthly cost:        $336 + (0.14 x $2,480) = $683
  p95 latency:         410ms   (most requests never touch the medium model)

Chosen: routing. 96.5% accuracy at $683/month, versus 96.8% at $2,480.

Routing implemented:

python
async def extract(email: str) -> Extraction:
    result = await small_model.extract(email)

    # Escalate on the model's own uncertainty, or on a structural signal
    # that we know correlates with failure.
    needs_escalation = (
        result.confidence < 0.75
        or email_has_attachment(email)
        or count_distinct_issues(email) > 1
    )

    if needs_escalation:
        metrics.increment("extraction.escalated")
        return await medium_model.extract(email)

    return result

Notes

  • The routing threshold should be tuned on the evaluation set by plotting accuracy against escalation rate. There is usually a knee where a small increase in escalation buys most of the remaining accuracy.
  • Structural escalation signals (has an attachment, exceeds a length, contains a table) are often better predictors of failure than the model's own confidence score, and they are free to compute.
  • When a provider releases a new model, the correct response is to run your evaluation set against it, not to migrate on the announcement. Sometimes the newer model is worse at your specific task.

Frequently asked questions

What does the Model Selection AI skill do?

Use when choosing which LLM to use for a task. Covers matching capability to task, cost and latency trade-offs, routing between models, benchmark skepticism, and evaluating on your own data. Trigger on "which model should i use for this", "is the new model worth switching to", "route easy requests to a cheaper model". Do not use for building the evaluation set itself — see the llm-evaluation skill; for cutting token spend, see the llm-cost-optimization skill.

Why use Model Selection on TypingMind?

Because you install it once and use it with any model. Model Selection is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Model Selection in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/model-selection. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Model Selection?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Model Selection?

As many as you like. As long as a model supports skills, you can use Model Selection with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Model Selection AI skill free?

Yes. It is published on GitHub by nimadorostkar under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇