<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mo Al Mamun (Mamun)</title>
    <description>The latest articles on DEV Community by Mo Al Mamun (Mamun) (@md_almamunmamun_857ec).</description>
    <link>https://dev.to/md_almamunmamun_857ec</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4187573%2Ffdf3d6c2-ca25-414c-94f2-8d6dea2dbed8.jpg</url>
      <title>DEV Community: Mo Al Mamun (Mamun)</title>
      <link>https://dev.to/md_almamunmamun_857ec</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/md_almamunmamun_857ec"/>
    <language>en</language>
    <item>
      <title>Can a Decision Model Replace Hand-Written Routing Rules? A 3,080-Message Experiment</title>
      <dc:creator>Mo Al Mamun (Mamun)</dc:creator>
      <pubDate>Sat, 17 Oct 2026 16:45:02 +0000</pubDate>
      <link>https://dev.to/md_almamunmamun_857ec/can-a-decision-model-replace-hand-written-routing-rules-a-3080-message-experiment-1mnd</link>
      <guid>https://dev.to/md_almamunmamun_857ec/can-a-decision-model-replace-hand-written-routing-rules-a-3080-message-experiment-1mnd</guid>
      <description>&lt;p&gt;A customer writes, “My card still hasn't arrived.” Somewhere in the backend, that sentence has to become a concrete choice: track an existing delivery, explain delivery times, or order another card.&lt;/p&gt;

&lt;p&gt;I wanted to test whether a decision model could replace the hand-written logic that makes that choice.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;switchless&lt;/strong&gt;: a fictional banking backend with 77 actions, four interchangeable dispatchers, and an evaluation on the 3,080-message Banking77 test set.&lt;/p&gt;

&lt;p&gt;The result was useful, but less tidy than the original hypothesis. &lt;strong&gt;JEV beat our rules and answered about nine times faster than the LLM. The LLM was cheaper. At the same number of referrals, combining rules and JEV produced fewer incorrect automatic selections in an exploratory comparison, but still left roughly one wrong choice in eleven.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: This is an independent experiment. I have no relationship with TypeSafe and received no credits, funding, or other support from them for this work.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The part of the backend I wanted to replace
&lt;/h2&gt;

&lt;p&gt;This experiment is about interpreting language into an action. It isn't about replacing a gateway's endpoint table, authentication checks, permissions, or load balancing.&lt;/p&gt;

&lt;p&gt;For an explicit request such as &lt;code&gt;POST /cards/123/freeze&lt;/code&gt;, the destination is already known. For “I can't find my card,” the application has to interpret the request first.&lt;/p&gt;

&lt;p&gt;The fictional product, Kestrel Bank, has 11 service modules and 77 implemented handlers. Some return information; others change an in-memory bank's state. They run inside one application, rather than as independently deployed microservices.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Customer message
      |
      v
POST /help
      |
      v
Interchangeable dispatcher
      |
      +--&amp;gt; Selected action --&amp;gt; Existing handler
      |
      +--&amp;gt; Abstain --&amp;gt; Escalation response / suggestions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keeping the handlers and gateway shared let us change the selector without rebuilding the rest of the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four ways to make the same choice
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Rules:&lt;/strong&gt; an ordered keyword-and-regex dispatcher, developed in eight stages. It abstains when no rule matches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JEV:&lt;/strong&gt; TypeSafe's &lt;code&gt;jev-1.13.0&lt;/code&gt;, asked to choose among the 77 action IDs and their one-line descriptions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LLM:&lt;/strong&gt; OpenAI &lt;code&gt;gpt-6-luna&lt;/code&gt;, given the same catalogue and customer message, with structured output and reasoning disabled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hybrid:&lt;/strong&gt; run both rules and JEV. Accept their selection when they agree. When they disagree, accept JEV only if its confidence is at least 0.9; otherwise abstain.&lt;/p&gt;

&lt;p&gt;The two model routers received no example messages in their requests. Here, “zero-shot” describes that setup; it doesn't establish whether either provider's training data included this public benchmark.&lt;/p&gt;

&lt;p&gt;The rules were written by an AI coding assistant and reviewed as part of the project. That matters: this is a comparison against one disclosed implementation, not the best rule system a specialist team could build.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the experiment was measured
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://huggingface.co/datasets/PolyAI/banking77" rel="noopener noreferrer"&gt;Banking77&lt;/a&gt; contains short banking-support messages labelled with 77 intents. Each intent maps to one action in Kestrel Bank.&lt;/p&gt;

&lt;p&gt;We reserved 1,000 training messages as a held-out measurement sample and used the other 9,003 for rule development. A different 1,000-message sample, drawn from the rule-development pool, was used to choose the hybrid strategy and threshold. It was disjoint from the held-out measurement sample, but overlapped the data available for rule development. The final test evaluation used all 3,080 test messages. Rules, JEV, and hybrid settings were frozen before it; the LLM was added afterward in a separate run without retuning those systems.&lt;/p&gt;

&lt;p&gt;The main metric was exact-action accuracy. Sending a message to the right service but choosing the wrong handler did not count as correct. Abstentions count as misses in overall accuracy and are reported separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  The results
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Measure&lt;/th&gt;
&lt;th&gt;Rules&lt;/th&gt;
&lt;th&gt;JEV&lt;/th&gt;
&lt;th&gt;LLM&lt;/th&gt;
&lt;th&gt;Hybrid&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Exact-action accuracy&lt;/td&gt;
&lt;td&gt;65.5%&lt;/td&gt;
&lt;td&gt;80.9%&lt;/td&gt;
&lt;td&gt;81.5%&lt;/td&gt;
&lt;td&gt;74.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Referred / abstained&lt;/td&gt;
&lt;td&gt;17.0%&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;18.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accuracy on answered messages&lt;/td&gt;
&lt;td&gt;78.9%&lt;/td&gt;
&lt;td&gt;80.9%&lt;/td&gt;
&lt;td&gt;81.5%&lt;/td&gt;
&lt;td&gt;90.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median decision time&lt;/td&gt;
&lt;td&gt;0.29 ms&lt;/td&gt;
&lt;td&gt;111 ms&lt;/td&gt;
&lt;td&gt;975 ms&lt;/td&gt;
&lt;td&gt;112 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API cost per 1,000&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;$0.083&lt;/td&gt;
&lt;td&gt;$0.028&lt;/td&gt;
&lt;td&gt;$0.083&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router implementation lines&lt;/td&gt;
&lt;td&gt;772&lt;/td&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;td&gt;95&lt;/td&gt;
&lt;td&gt;888&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are recorded-run measurements. API cost excludes infrastructure and human work. The hybrid's line count includes both underlying routers and its combining logic; the model integrations don't include provider-side model complexity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpvce62051c02j8qblxkn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpvce62051c02j8qblxkn.png" alt="Exact-action accuracy by service module: JEV versus rules" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;JEV outperformed this rules implementation in each of the 11 service modules.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  More rules helped, until the gains became small
&lt;/h3&gt;

&lt;p&gt;On the 1,000-message held-out sample, the first 137 lines reached 39.4% accuracy. At 380 lines, accuracy was 55.2%. The final 772-line version reached 63.0%.&lt;/p&gt;

&lt;p&gt;Later stages often repaired earlier rules. A concrete example: a pattern for &lt;code&gt;cheque|check&lt;/code&gt; also caught the verb “check,” confusing a request about checking card status with a cheque-related intent.&lt;/p&gt;

&lt;p&gt;The append-only development policy made the history inspectable, but it also inflated the accumulated code compared with normal maintenance, where an engineer could edit or remove an old rule. The curve describes this development process, not a universal ceiling for rules.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4474apsvcnr9k22l1f7x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4474apsvcnr9k22l1f7x.png" alt="Rules accuracy across eight development stages compared with JEV" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The effort curve uses the separate 1,000-message held-out sample. Lines measure local implementation size, not engineering hours or provider-side model complexity.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  JEV was faster, while the LLM was cheaper
&lt;/h3&gt;

&lt;p&gt;JEV's median decision took 111 ms, compared with 975 ms for Luna: about an 8.8-fold difference in these runs.&lt;/p&gt;

&lt;p&gt;Accuracy was close. The LLM's observed advantage was &lt;strong&gt;0.65 percentage points&lt;/strong&gt;, with a paired 95% confidence interval from &lt;strong&gt;−0.38 to +1.68 points&lt;/strong&gt;. No difference was detected on this test split; that does not prove equivalence. On the separate 1,000-message held-out sample, the LLM led by 2.20 points, with an interval from +0.19 to +4.21.&lt;/p&gt;

&lt;p&gt;The price result contradicted the original expectation. The LLM cost about a third as much. Its repeated action catalogue benefited from cached-input pricing. Cheap classification isn't automatically cheaper than a low-cost generative model under a particular workload.&lt;/p&gt;

&lt;p&gt;JEV was pinned to &lt;code&gt;jev-1.13.0&lt;/code&gt;; the LLM had no pinned snapshot and was run once per evaluation split. On a fixed 200-message test subset, two repeat JEV runs changed 2.0% and 0.5% of selections relative to the original run; reversing the option order changed 5.0%.&lt;/p&gt;

&lt;p&gt;The intervals describe uncertainty over messages. They don't cover model drift, different network conditions, or variation across repeated API runs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqo58ts03iik1mtb3tzbt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqo58ts03iik1mtb3tzbt.png" alt="Exact-action accuracy versus median decision latency for rules, JEV, and Luna" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Latency uses a logarithmic scale. The observed JEV–LLM accuracy difference was within the paired 95% confidence interval.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the hybrid actually buys
&lt;/h2&gt;

&lt;p&gt;The hybrid answered 2,516 messages and referred 564. Of the answered messages, 233 were incorrect: &lt;strong&gt;90.7% accuracy at 81.7% coverage&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To put that beside the single-model routers, the analysis also referred each model's 564 least-confident messages. Confidence ties were broken by dataset index, with a sensitivity calculation for other tie orders.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Policy&lt;/th&gt;
&lt;th&gt;Referrals&lt;/th&gt;
&lt;th&gt;Accuracy on answered (95% CI)&lt;/th&gt;
&lt;th&gt;Incorrect automatic selections&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hybrid&lt;/td&gt;
&lt;td&gt;564&lt;/td&gt;
&lt;td&gt;90.7% (89.5–91.8)&lt;/td&gt;
&lt;td&gt;233&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JEV, confidence-gated&lt;/td&gt;
&lt;td&gt;564&lt;/td&gt;
&lt;td&gt;88.8% (87.5–90.0)&lt;/td&gt;
&lt;td&gt;282&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM, confidence-gated&lt;/td&gt;
&lt;td&gt;564&lt;/td&gt;
&lt;td&gt;87.7% (86.3–88.9)&lt;/td&gt;
&lt;td&gt;310&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Intervals are 95% Wilson intervals for each policy’s answered accuracy, conditional on the selected messages; they do not account for selecting cutoffs on the test set. They are not intervals for the differences between policies.&lt;/p&gt;

&lt;p&gt;This is an &lt;strong&gt;exploratory comparison at equal referral volume&lt;/strong&gt;. The model cutoffs were selected on the test set to match the count, while the hybrid threshold was fixed beforehand. These policies refer different messages, which may require different amounts of human effort. Reordering boundary ties moved the LLM's answered accuracy between 87.3% and 88.1%; it did not reverse the observed ordering.&lt;/p&gt;

&lt;p&gt;The hybrid made fewer incorrect automatic selections in this comparison; this observed difference does not establish superiority on future traffic. It also retained all the rules and called JEV on every message. That is a tradeoff, not a free improvement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs5qp5dr4s8oe09cvuz5w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs5qp5dr4s8oe09cvuz5w.png" alt="Answered accuracy versus referral rate for rules, hybrid, and JEV thresholds" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;JEV’s threshold sweep is exploratory and uses the test split. Referrals are abstentions; human resolution and actual review effort were not measured.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Correct selection and safe execution are different questions
&lt;/h2&gt;

&lt;p&gt;The gateway executes its selected handler immediately. Twenty handlers can change bank state, including blocking a card, opening a claim, or cancelling a pending transfer.&lt;/p&gt;

&lt;p&gt;Of the hybrid's 233 incorrect selections, &lt;strong&gt;32 selected a handler capable of changing state&lt;/strong&gt;. These are not 32 observed harmful actions: whether a handler changes anything depends on the customer's account state, and the evaluation logs record predictions rather than real customer outcomes.&lt;/p&gt;

&lt;p&gt;Likewise, an abstention only produces an escalation response or suggestions. We did not measure a human successfully resolving it.&lt;/p&gt;

&lt;p&gt;This distinction changed how I describe the project. The results support replacing some hand-written intent-selection logic. They do not establish that the resulting actions are safe to execute without further checks or confirmation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F38q098292h0liqctlw77.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F38q098292h0liqctlw77.png" alt="JEV confidence compared with observed exact-action accuracy" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Higher confidence corresponded to higher accuracy, but did not guarantee correctness. Bins include at least 20 messages; calibration of intent selection does not establish safety of execution.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this fits with other work
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.glean.com/blog/jev-zero-shot-classifier" rel="noopener noreferrer"&gt;Glean's JEV evaluation&lt;/a&gt; helped motivate this experiment. On 40 cases with positive expert transfers, it reported a median per-entry speedup of 8.1× over its existing LLM path. Results across its other tasks were mixed: JEV did not replace Glean’s production reranker. The speedup is supporting context from a different task and a small latency sample.&lt;/p&gt;

&lt;p&gt;The closest comparison I found is &lt;a href="https://www.lyzr.ai/blog/jev-as-an-ai-router-and-controller/" rel="noopener noreferrer"&gt;Lyzr's Banking77 evaluation&lt;/a&gt;: it reports 80.1% zero-shot JEV accuracy on 770 messages, close to our 80.9%. It also reports 87.5% for an embedding classifier with ten labelled examples per intent and 93.9% for logistic regression trained on the full labelled set. Those aren't directly interchangeable measurements, but they expose an important gap in this project: &lt;strong&gt;we did not test a trained-classifier or embedding baseline.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This study therefore compares four implementations, rather than identifying the best available Banking77 classifier. A trained baseline is a useful next experiment, alongside adding new actions and measuring regressions in the original catalogue.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would test next: learning from corrections
&lt;/h2&gt;

&lt;p&gt;The next question is whether reviewed mistakes can improve the selector without rebuilding the backend. My hypothesis is that a small domain-specific model, or better context for JEV, could help with recurring confusions. &lt;strong&gt;These are proposed experiments, not measured improvements in this study.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I would begin with supervised learning from corrected labels. Calling that reinforcement learning would be premature: we already have a direct target—the intended action. Learning a routing policy from delayed outcome rewards would be a separate experiment, with a harder problem of defining and attributing success.&lt;/p&gt;

&lt;p&gt;There are three paths worth comparing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Improve the information JEV receives.&lt;/strong&gt; Clarify overlapping action descriptions and boundary cases, or retrieve a few relevant, human-reviewed examples into the request. &lt;a href="https://docs.typesafe.ai/models#customizing-jev" rel="noopener noreferrer"&gt;TypeSafe’s customization documentation&lt;/a&gt; says customer fine-tuning and LoRA adapters are not supported; customization happens through state, instructions, criteria, and decomposed questions. Retrieved examples would make this a new, example-assisted configuration, not the zero-shot setup reported above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Train a small local classifier.&lt;/strong&gt; Start with embeddings plus logistic regression, trained on representative banking messages and reviewed corrections. Include ordinary successful cases as well as failures, so the training distribution is not dominated by exceptional cases. Evaluate this model on its own before deciding it belongs in a fallback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test a learned fallback or combining model.&lt;/strong&gt; Use validation data to learn when the local classifier should override JEV, using signals such as disagreement, probability margins, or recurring intent confusions. A low-confidence trigger alone will miss confidently wrong selections. Another candidate is a model trained on probabilities from several narrow JEV questions, an approach also described in TypeSafe’s documentation. Unresolved cases would still abstain.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The evaluation matters as much as the mechanism. I would log both errors corrected and previously correct decisions broken, then compare overall accuracy, accuracy at equal referral volume, latency, cost, and incorrect selections of state-changing handlers. Better calibration alone would not demonstrate better classification or safe execution.&lt;/p&gt;

&lt;p&gt;Corrections and threshold selection must use development data. The existing test set has already informed this analysis; if its failures guide changes, it becomes a regression set rather than an untouched final test. A new locked evaluation set—ideally from a later, representative workload—would be needed to support a fresh improvement claim. Any learned combining model should also use out-of-fold development predictions to avoid training on unrealistically easy, in-sample outputs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspect the evidence
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/grinder81/switchless" rel="noopener noreferrer"&gt;switchless repository&lt;/a&gt; contains the TypeScript application, decision log, rules development history, tests, and all 16 original prediction files with SHA-256 hashes.&lt;/p&gt;

&lt;p&gt;With Node 22+ and pnpm, the analysis can be regenerated without model API calls:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/grinder81/switchless.git
&lt;span class="nb"&gt;cd &lt;/span&gt;switchless
pnpm &lt;span class="nb"&gt;install
&lt;/span&gt;pnpm analyze
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;a href="https://github.com/grinder81/switchless/blob/main/results/analysis.md" rel="noopener noreferrer"&gt;generated analysis&lt;/a&gt; includes confidence intervals, paired comparisons, referral tie sensitivity, and the state-changing-handler breakdown. The &lt;a href="https://github.com/grinder81/switchless/blob/main/results/raw/README.md" rel="noopener noreferrer"&gt;raw-run notes&lt;/a&gt; distinguish runtime records from reconstructed values and project-log provenance. Original token counts were not retained; the cost values were calculated at runtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I worked with AI
&lt;/h2&gt;

&lt;p&gt;I framed and directed the experiment, chose the dataset and implementation constraints, required the product and a rules baseline, and reviewed the phase PRs. Claude wrote most of the implementation, rules, and measurement code. A subsequent review challenged the claims and led to preserved raw evidence, reproducible statistical analysis, and narrower conclusions. This article was also prepared with AI assistance and is being reviewed by me.&lt;/p&gt;

&lt;p&gt;My practical conclusion is that a decision model can be a useful replacement for a hand-written language selector. In this experiment it improved accuracy and reduced local selection code, while the surrounding application remained essential. Choosing whether to execute a selected action needs its own evidence and controls.&lt;/p&gt;

&lt;p&gt;If you maintain a similar dispatcher, what would determine your choice: labelled-data availability, latency, the cost of a wrong selection, or the effort of adding new actions?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>architecture</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
