← All demos
k_ai-basics · Demo 04 · Routing

Who should handle this?

How AI picks the right helper for your request

Imagine calling a big company. A receptionist listens, then says: "That sounds like billing. Let me put you through." If they send you to the wrong team, you wait twice as long.

Many AI systems work the same way. Instead of one AI doing everything, there are several "skills". Each skill is good at one job. A router reads your request first, and picks which skill should handle it.

The router on this page has 3 skills to choose from:

Each skill has a short list of words it looks for. The router checks how many of those words are in your request, and gives each skill a score. The highest score wins. If no skill scores high enough, the router does not guess. It says a person should decide.

More detail

Each skill has a short list of trigger words. The router scores every skill by how many of its words appear in your request — 3 of 7 words is a score of 0.43. The highest score wins. If even the best one scores under 0.2, the router doesn't guess: it says a person should decide.

6 examples: who got the job?

Each example shows a request, the score each skill got, and who won.

[CHECKING] each skill's score, and the words that matched · [ROUTED TO] the skill that gets the job · [NO CONFIDENT MATCH] no skill scored high enough

  1. You ask: fix the bug where login fails silently

    [REQUEST]  "fix the bug where login fails silently"
    [CHECKING] bug-fixer             -> score: 0.43  (matched: bug, fails, fix)
    [CHECKING] writer                -> score: 0.00
    [CHECKING] release-notes-helper  -> score: 0.00
    [ROUTED TO] bug-fixer
    [WHY] Highest keyword overlap with this skill's trigger terms.
    📋 Rule-based

    ✅ Right skill. "fix", "bug" and "fails" are all bug-fixer words.

  2. You ask: write the release notes for version 2

    [REQUEST]  "write the release notes for version 2"
    [CHECKING] bug-fixer             -> score: 0.00
    [CHECKING] writer                -> score: 0.12  (matched: write)
    [CHECKING] release-notes-helper  -> score: 0.43  (matched: notes, release, version)
    [ROUTED TO] release-notes-helper
    [WHY] Highest keyword overlap with this skill's trigger terms.
    📋 Rule-based

    ✅ Right skill. "write" matched the writer a little, but "release", "notes" and "version" won easily.

  3. You ask: draft a blog post announcing the fix for the login bug

    [REQUEST]  "draft a blog post announcing the fix for the login bug"
    [CHECKING] bug-fixer             -> score: 0.29  (matched: bug, fix)
    [CHECKING] writer                -> score: 0.38  (matched: blog, draft, post)
    [CHECKING] release-notes-helper  -> score: 0.00
    [ROUTED TO] writer
    [WHY] Highest keyword overlap with this skill's trigger terms.
    📋 Rule-based

    ✅ Right skill, but close. It is about a bug fix, so bug-fixer scored too. But the job is a blog post, and the writer matched more.

  4. You ask: my app keeps crashing

    [REQUEST]  "my app keeps crashing"
    [CHECKING] bug-fixer             -> score: 0.00
    [CHECKING] writer                -> score: 0.00
    [CHECKING] release-notes-helper  -> score: 0.00
    [NO CONFIDENT MATCH] No skill scored above the threshold (0.2) — a real router would ask a human instead of guessing.

    ❌ Gave up. This is clearly a bug. But the rule knows "crash", not "crashing". To this rule, they are different words.

  5. You ask: my blog post has a broken link

    [REQUEST]  "my blog post has a broken link"
    [CHECKING] bug-fixer             -> score: 0.14  (matched: broken)
    [CHECKING] writer                -> score: 0.25  (matched: blog, post)
    [CHECKING] release-notes-helper  -> score: 0.00
    [ROUTED TO] writer
    [WHY] Highest keyword overlap with this skill's trigger terms.
    📋 Rule-based

    ❌ Wrong skill, with confidence. A broken link is a bug to fix. But "blog" and "post" are two writer words, so the writer wins.

  6. You ask: help me plan a birthday party

    [REQUEST]  "help me plan a birthday party"
    [CHECKING] bug-fixer             -> score: 0.00
    [CHECKING] writer                -> score: 0.00
    [CHECKING] release-notes-helper  -> score: 0.00
    [NO CONFIDENT MATCH] No skill scored above the threshold (0.2) — a real router would ask a human instead of guessing.

    ✅ Honest. No skill fits a birthday party. So instead of guessing, it says a person should decide.

The lesson: this router matches words, not meaning. Use its words, and it picks well. Say the same thing another way, and it gives up, or sends you to the wrong helper without noticing. Many AI systems today let the AI read the request and pick. That is much smarter, but it can still pick wrong.

Try it yourself

Tap an example to put it in the box. Then change it a little and watch the scores change. Can you find another request that goes to the wrong helper?

Getting the router ready in your browser…

What the router does: