bots-garden/mini-mepublic Fork
⑂ v1.0.0
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. 5266466 · on v1.0.0 · k33g · 16h ago
route-skills-with-a-decision-model.md · 57 lines · 2.5 KBmarkdown
Blame HistoryOpen raw

How to route skills with a decision model

This guide shows how to have a decision model choose, before each turn, which skill applies to your question, so that the chat model receives the same [skill: …] line as if you had typed $<skill>. It assumes you have a decider agent file (see How to ask a decision model) and an agent with skills.

Steps

  1. Add a skillRouting block to the agent that answers you:

    skillRouting:
      decider: agent.decider.yaml   # relative to this file
      minConfidence: 0.6
      timeout: 2s
    

    The decider file only has to locate the model (provider, model, baseUrl, fallback); its decision: questions are not used here.

  2. Start the agent. The banner ends with the routing column:

    … | routing: llamacpp/LiquidAI/d1-3B-GGUF:Q4_K_M ≥ 0.60
    
  3. Ask a question. Before the turn, a 🧭 notice says what the decider chose:

    > what time is it in Tokyo?
    🧭 $what-time-is-it (0.97)
    
    > explain in one sentence what a goroutine is
    🧭 no skill (none 0.96)
    

    A skill below minConfidence is shown and not appended: 🧭 no skill (lsp-navigation 0.42 < 0.60). A question that already names a $skill is not routed.

Variants

  • Fewer misses: lower minConfidence. In the run measured on 2026-10-22 (see Decision models), no threshold made the decider append a wrong skill; a higher one only made it abstain more.
  • A decider that loads slowly: the first call loads the model (~13 s) and exceeds timeout: that turn shows 🧭 skill routing skipped: … context deadline exceeded and goes on without routing. Send one question to the decider first (mm -config agent.decider.yaml -p "hi"), or raise timeout.
  • In an editor: the notice goes to the agent's log ([acp] session <id>: 🧭 …), not to the conversation.

Check it on your catalogue

Run the routing eval through the decider before relying on it:

MM_EVAL=1 MM_DECIDER=demos/decision-skills/agent.decider.yaml go test ./internal/eval -run Decider -v

See How to measure whether the model picks the right skill.

See also

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# How to route skills with a decision model

This guide shows how to have a decision model choose, before each turn, which skill applies to your question, so that the chat model receives the same `[skill: …]` line as if you had typed `$<skill>`. It assumes you have a decider agent file (see [How to ask a decision model](ask-a-decision-model.md)) and an agent with skills.

## Steps

1. Add a `skillRouting` block to the agent that answers you:

   ```yaml
   skillRouting:
     decider: agent.decider.yaml   # relative to this file
     minConfidence: 0.6
     timeout: 2s
   ```

   The decider file only has to locate the model (`provider`, `model`, `baseUrl`, `fallback`); its `decision:` questions are not used here.

2. Start the agent. The banner ends with the routing column:

   ```
   … | routing: llamacpp/LiquidAI/d1-3B-GGUF:Q4_K_M ≥ 0.60
   ```

3. Ask a question. Before the turn, a `🧭` notice says what the decider chose:

   ```
   > what time is it in Tokyo?
   🧭 $what-time-is-it (0.97)
   ```

   ```
   > explain in one sentence what a goroutine is
   🧭 no skill (none 0.96)
   ```

   A skill below `minConfidence` is shown and not appended: `🧭 no skill (lsp-navigation 0.42 < 0.60)`. A question that already names a `$skill` is not routed.

## Variants

- **Fewer misses**: lower `minConfidence`. In the run measured on 2026-10-22 (see [Decision models](../explanation/decision-models.md#what-was-measured)), no threshold made the decider append a wrong skill; a higher one only made it abstain more.
- **A decider that loads slowly**: the first call loads the model (~13 s) and exceeds `timeout`: that turn shows `🧭 skill routing skipped: … context deadline exceeded` and goes on without routing. Send one question to the decider first (`mm -config agent.decider.yaml -p "hi"`), or raise `timeout`.
- **In an editor**: the notice goes to the agent's log (`[acp] session <id>: 🧭 …`), not to the conversation.

## Check it on your catalogue

Run the routing eval through the decider before relying on it:

```bash
MM_EVAL=1 MM_DECIDER=demos/decision-skills/agent.decider.yaml go test ./internal/eval -run Decider -v
```

See [How to measure whether the model picks the right skill](measure-skill-routing.md#measure-a-decider).

## See also

- Every `skillRouting` key and notice: [Configuration reference](../reference/configuration.md#skillrouting)
- Why the line is appended rather than the skill loaded: [Decision models](../explanation/decision-models.md)