{
  "generatedAt": "2026-10-05T19:56:02.122Z",
  "benchmarkId": "memcat-support-routing-v2",
  "package": {
    "name": "@memcat/sdk",
    "version": "0.2.1"
  },
  "artifacts": {
    "emittedRouter": {
      "path": "packages/sdk/dist/router.js",
      "bytes": 23969,
      "sha256": "3310fe2d039507e1dd978d62ca0b887efcd88a9d0fe818cc4a09e68caed98143"
    },
    "routerSourceSha256": "faf3ede2a8943919ea85005b744db686d9dc73705eea8f9bc2454472cb4ac899",
    "fixture": {
      "path": "src/lib/memcat-demo.ts",
      "sha256": "24f6d5f0aaf34b7f4aedf051a503b07f67b6f4599c64e16fd2dec8add48d4381"
    },
    "benchmarkScriptSha256": "0e3248d42bc15e40a2834db8123110d8af510370285beda98cebf6de0df4811c"
  },
  "environment": {
    "node": "v22.22.3",
    "platform": "darwin",
    "osRelease": "25.2.0",
    "arch": "arm64",
    "cpu": "Apple M4 Max",
    "logicalCpus": 16
  },
  "policy": {
    "version": "memcat-support-demo-v1",
    "routes": [
      {
        "id": "charged",
        "match": {
          "field": "input",
          "op": "startsWith",
          "value": "I was charged "
        },
        "handler": "billing"
      },
      {
        "id": "cancel",
        "match": {
          "field": "input",
          "op": "startsWith",
          "value": "Please cancel my "
        },
        "handler": "billing"
      },
      {
        "id": "login",
        "match": {
          "field": "input",
          "op": "startsWith",
          "value": "I cannot log in "
        },
        "handler": "technical"
      },
      {
        "id": "crashes",
        "match": {
          "field": "input",
          "op": "startsWith",
          "value": "The app crashes "
        },
        "handler": "technical"
      },
      {
        "id": "demo",
        "match": {
          "field": "input",
          "op": "startsWith",
          "value": "Can I book a demo "
        },
        "handler": "sales"
      },
      {
        "id": "pricing",
        "match": {
          "field": "input",
          "op": "startsWith",
          "value": "I need pricing for "
        },
        "handler": "sales"
      }
    ],
    "fallback": "model_review"
  },
  "ruleCount": 6,
  "method": {
    "synthetic": true,
    "warmupBatches": 20,
    "measuredBatches": 100,
    "execution": "Sequential awaited calls in one process, fresh router per batch, cache disabled. Input is raw text without a supplied category. Local handlers return small fixed records; review fallback records a review requirement and makes no provider call.",
    "timing": "performance.now() wall time covers the complete loop, router validation, ordered literal matching, trace creation, callback execution, timeout bookkeeping, output cloning and result collection. Excludes instance construction, fixture generation, warmup, assertions, counting, hashing, file writes, DOM work and transport.",
    "percentile": "Nearest rank on 100 complete batch samples. No forced garbage collection, outlier removal, or performance threshold.",
    "correctness": "Every output in every warmup and measured batch is checked against the hand-authored expected category and route. Category counts are observed from SDK outputs and compared with fixture expectations, never set to a quota. This verifies fixture conformance only; it is not a semantic accuracy evaluation on unseen language.",
    "limitations": "Forty short authored English templates sampled uniformly with replacement using seeded Mulberry32, with a variable reference number. The corpus contains 9 billing, 12 technical, 5 sales and 14 unmatched templates: its composition is synthetic, not an observed customer distribution. Six ordered case-sensitive prefix rules and fixed local outputs. No embeddings, tokenization, semantic intent inference, external actions, API requests, model inference, concurrency load, or production workload. Results are specific to this machine and runtime. Large documents, more rules, Unicode normalization, ambiguity, and real handlers require separate evaluation."
  },
  "network": {
    "providerCalls": 0,
    "blockedFetchAttempts": 0
  },
  "workloads": [
    {
      "recordsPerBatch": 100,
      "input": {
        "source": "makeMemcatItems(count, MEMCAT_DEMO_SEED)",
        "seed": 20261006,
        "templateCount": 40,
        "sampling": "Uniform sampling with replacement from 40 authored templates using seeded Mulberry32. Corpus: 9 billing, 12 technical, 5 sales and 14 unmatched templates. Synthetic traffic; no category quotas or production-distribution claim.",
        "distinctTexts": 100,
        "textUtf8Bytes": 5775,
        "serializedRequestUtf8Bytes": 7076,
        "minTextCharacters": 28,
        "maxTextCharacters": 78,
        "averageTextCharacters": 57.75,
        "requestSha256": "865f7b55a6d22259456637e101852e4a7965aec77dac42be41edb6f394212de1",
        "fixturesSha256": "db1cc09a92aff9cbffd81f195b165eade8887f78dae2c50d9d3cf24e1a6c5c7d",
        "firstRequests": [
          {
            "input": "We need to change the owner of workspace #1."
          },
          {
            "input": "I was charged for an extra seat on workspace #2. Could you check the invoice?"
          },
          {
            "input": "Can I book a demo of the enterprise features? Our enquiry reference is #3."
          },
          {
            "input": "I was charged for an extra seat on workspace #4. Could you check the invoice?"
          },
          {
            "input": "Can we get a walkthrough before buying? Our team reference is #5."
          },
          {
            "input": "The invoice for account #6 needs our new company address."
          },
          {
            "input": "The invoice for account #7 needs our new company address."
          },
          {
            "input": "Please cancel my trial on account #8; I do not want it to renew."
          }
        ]
      },
      "limits": {
        "maxCalls": 100,
        "maxConcurrent": 1,
        "timeoutMs": 1000
      },
      "counts": {
        "warmupBatches": 20,
        "measuredBatches": 100,
        "recordsVerified": 12000,
        "expectedCategoriesPerBatch": {
          "model_review": 33,
          "billing": 22,
          "sales": 11,
          "technical": 34
        },
        "observedCategoriesPerBatch": {
          "model_review": 33,
          "billing": 22,
          "sales": 11,
          "technical": 34
        },
        "literalRuleChecksPerBatch": 412,
        "callbackAttemptsPerBatch": {
          "total": 100,
          "local": 100,
          "model": 0
        },
        "providerCallsPerBatch": 0
      },
      "output": {
        "stableResultSha256": "9cfcdfe9fc90a2f4b58bbee22a1f3bf0ffb0e7d11feb8c23ce7ab942801255b4",
        "firstResults": [
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "charged",
            "handlerId": "billing",
            "output": {
              "category": "billing",
              "providerCalled": false,
              "reviewRequired": false
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "demo",
            "handlerId": "sales",
            "output": {
              "category": "sales",
              "providerCalled": false,
              "reviewRequired": false
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "charged",
            "handlerId": "billing",
            "output": {
              "category": "billing",
              "providerCalled": false,
              "reviewRequired": false
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "cancel",
            "handlerId": "billing",
            "output": {
              "category": "billing",
              "providerCalled": false,
              "reviewRequired": false
            }
          }
        ]
      },
      "batchMilliseconds": {
        "median": 0.3212079999999986,
        "p95": 0.5614160000000084,
        "min": 0.2691250000000025,
        "max": 0.6634580000000057
      },
      "samplesMilliseconds": [
        0.44779100000000227,
        0.44675000000000153,
        0.6634580000000057,
        0.46904099999999005,
        0.4983749999999958,
        0.46116600000000574,
        0.5907499999999999,
        0.4522089999999963,
        0.44770800000000577,
        0.5947919999999982,
        0.5614160000000084,
        0.44899999999999807,
        0.5163750000000107,
        0.6439589999999953,
        0.5017500000000013,
        0.42804099999999323,
        0.5594999999999999,
        0.41816599999999937,
        0.4686659999999989,
        0.4358749999999958,
        0.5840830000000068,
        0.4797499999999957,
        0.3130000000000024,
        0.4359579999999994,
        0.3212079999999986,
        0.31808300000000145,
        0.3130000000000024,
        0.4209590000000105,
        0.2917500000000075,
        0.315291000000002,
        0.3648330000000044,
        0.3598750000000024,
        0.3020000000000067,
        0.31629199999999,
        0.4300829999999962,
        0.298917000000003,
        0.3029590000000013,
        0.2967909999999989,
        0.39537500000000136,
        0.2943340000000063,
        0.29537500000000705,
        0.2883329999999944,
        0.3185409999999962,
        0.3064590000000038,
        0.30470900000000256,
        0.43274999999999864,
        0.3041249999999991,
        0.2957499999999982,
        0.29233399999999676,
        0.4929170000000056,
        0.3538329999999945,
        0.2728749999999991,
        0.5344589999999982,
        0.3113340000000022,
        0.29795899999999165,
        0.2993329999999901,
        0.48099999999999454,
        0.32533300000000054,
        0.3044999999999902,
        0.32874999999999943,
        0.44225000000000136,
        0.29658399999999574,
        0.3041249999999991,
        0.4108329999999967,
        0.296875,
        0.28787499999999966,
        0.285499999999999,
        0.3997499999999974,
        0.28624999999999545,
        0.308833000000007,
        0.2920000000000016,
        0.386415999999997,
        0.3256250000000023,
        0.29333400000000154,
        0.4051249999999982,
        0.3265839999999969,
        0.3059159999999963,
        0.28804099999999266,
        0.4027089999999873,
        0.29395900000000097,
        0.2999159999999961,
        0.28429199999999355,
        0.4636250000000075,
        0.30929100000000176,
        0.29241700000000037,
        0.3944580000000002,
        0.2907909999999987,
        0.29129199999999855,
        0.287666999999999,
        0.3955839999999995,
        0.3100000000000023,
        0.3508329999999944,
        0.2691250000000025,
        0.3986659999999915,
        0.2862919999999889,
        0.2913329999999945,
        0.4345830000000035,
        0.349624999999989,
        0.31566600000000733,
        0.2972910000000013
      ]
    },
    {
      "recordsPerBatch": 1000,
      "input": {
        "source": "makeMemcatItems(count, MEMCAT_DEMO_SEED)",
        "seed": 20261006,
        "templateCount": 40,
        "sampling": "Uniform sampling with replacement from 40 authored templates using seeded Mulberry32. Corpus: 9 billing, 12 technical, 5 sales and 14 unmatched templates. Synthetic traffic; no category quotas or production-distribution claim.",
        "distinctTexts": 1000,
        "textUtf8Bytes": 58522,
        "serializedRequestUtf8Bytes": 71523,
        "minTextCharacters": 28,
        "maxTextCharacters": 86,
        "averageTextCharacters": 58.522,
        "requestSha256": "632c1f7f89a98a5a703f03a54ce00c95570e1c1266771fb26a58867ccb221084",
        "fixturesSha256": "3155dc79e6d1ce23b3b4d012f276b11dd8a7654aec773cf56ab5ebc6fef79fa7",
        "firstRequests": [
          {
            "input": "We need to change the owner of workspace #1."
          },
          {
            "input": "I was charged for an extra seat on workspace #2. Could you check the invoice?"
          },
          {
            "input": "Can I book a demo of the enterprise features? Our enquiry reference is #3."
          },
          {
            "input": "I was charged for an extra seat on workspace #4. Could you check the invoice?"
          },
          {
            "input": "Can we get a walkthrough before buying? Our team reference is #5."
          },
          {
            "input": "The invoice for account #6 needs our new company address."
          },
          {
            "input": "The invoice for account #7 needs our new company address."
          },
          {
            "input": "Please cancel my trial on account #8; I do not want it to renew."
          }
        ]
      },
      "limits": {
        "maxCalls": 1000,
        "maxConcurrent": 1,
        "timeoutMs": 1000
      },
      "counts": {
        "warmupBatches": 20,
        "measuredBatches": 100,
        "recordsVerified": 120000,
        "expectedCategoriesPerBatch": {
          "model_review": 328,
          "billing": 209,
          "sales": 131,
          "technical": 332
        },
        "observedCategoriesPerBatch": {
          "model_review": 328,
          "billing": 209,
          "sales": 131,
          "technical": 332
        },
        "literalRuleChecksPerBatch": 4157,
        "callbackAttemptsPerBatch": {
          "total": 1000,
          "local": 1000,
          "model": 0
        },
        "providerCallsPerBatch": 0
      },
      "output": {
        "stableResultSha256": "c1ec1071f4f833d9d5f2778f0d6337958eda496894fb0c08999fa2d54b684e8e",
        "firstResults": [
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "charged",
            "handlerId": "billing",
            "output": {
              "category": "billing",
              "providerCalled": false,
              "reviewRequired": false
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "demo",
            "handlerId": "sales",
            "output": {
              "category": "sales",
              "providerCalled": false,
              "reviewRequired": false
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "charged",
            "handlerId": "billing",
            "output": {
              "category": "billing",
              "providerCalled": false,
              "reviewRequired": false
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "cancel",
            "handlerId": "billing",
            "output": {
              "category": "billing",
              "providerCalled": false,
              "reviewRequired": false
            }
          }
        ]
      },
      "batchMilliseconds": {
        "median": 3.1792919999999754,
        "p95": 3.4638330000000224,
        "min": 2.809291999999914,
        "max": 3.5156669999999792
      },
      "samplesMilliseconds": [
        3.257708000000008,
        3.357666999999992,
        3.3248330000000124,
        2.8749159999999847,
        3.2313330000000065,
        3.2142920000000004,
        3.0439169999999933,
        3.2902090000000044,
        3.179124999999999,
        2.9071250000000077,
        3.2394580000000133,
        3.4986249999999757,
        3.0306659999999965,
        3.3781660000000215,
        3.3463339999999846,
        3.0207080000000133,
        3.5156669999999792,
        3.424207999999993,
        2.9184589999999844,
        3.362000000000023,
        3.2999580000000037,
        2.9473750000000223,
        3.318667000000005,
        3.199291999999957,
        2.986750000000029,
        3.317834000000005,
        3.2266669999999635,
        2.9110000000000014,
        3.3542909999999893,
        3.434792000000016,
        2.847709000000009,
        3.3878330000000005,
        3.270333999999991,
        2.9811659999999733,
        3.427000000000021,
        3.269375000000025,
        2.905750000000012,
        3.3171250000000327,
        3.3822079999999914,
        2.9378340000000094,
        3.174500000000023,
        3.287999999999954,
        2.8443340000000035,
        3.4646250000000123,
        3.26720899999998,
        2.9920420000000263,
        3.234458000000018,
        3.2117090000000417,
        2.9949169999999867,
        3.1696660000000065,
        3.164625000000001,
        2.939583999999968,
        3.289457999999968,
        3.334583000000009,
        2.9140409999999974,
        3.1345420000000104,
        3.2274999999999636,
        2.8520839999999907,
        3.352958000000001,
        3.200790999999981,
        2.891666999999984,
        3.241207999999972,
        3.1426249999999527,
        2.9851249999999823,
        3.2890409999999974,
        3.314292000000023,
        3.059332999999981,
        3.2889999999999873,
        3.2396249999999895,
        2.988999999999976,
        3.3463330000000155,
        3.3979170000000067,
        2.9309169999999654,
        3.4496669999999767,
        3.4638330000000224,
        2.942625000000021,
        3.211541000000011,
        3.181541999999979,
        2.950999999999965,
        3.1792919999999754,
        3.1617500000000405,
        2.8686670000000163,
        3.499458000000004,
        3.487083000000041,
        2.936083999999994,
        3.1240829999999846,
        3.113166999999976,
        2.884042000000022,
        3.109042000000045,
        3.1636660000000347,
        2.809291999999914,
        3.1240420000000313,
        3.25583400000005,
        2.8931660000000647,
        3.110708000000045,
        3.1397080000000415,
        2.907041999999933,
        3.1721670000000586,
        2.8355829999999287,
        2.8810829999999896
      ]
    },
    {
      "recordsPerBatch": 10000,
      "input": {
        "source": "makeMemcatItems(count, MEMCAT_DEMO_SEED)",
        "seed": 20261006,
        "templateCount": 40,
        "sampling": "Uniform sampling with replacement from 40 authored templates using seeded Mulberry32. Corpus: 9 billing, 12 technical, 5 sales and 14 unmatched templates. Synthetic traffic; no category quotas or production-distribution claim.",
        "distinctTexts": 10000,
        "textUtf8Bytes": 591832,
        "serializedRequestUtf8Bytes": 721833,
        "minTextCharacters": 28,
        "maxTextCharacters": 87,
        "averageTextCharacters": 59.1832,
        "requestSha256": "930c8a7c76ee71d6182aa9c6fb6e7f9e3b1753a516de1628c8a50092c8b1a5fd",
        "fixturesSha256": "80241cd0d460f55a44600e65e40ee5630d57b2e5e30bd2431bcf83a6e3ccd7fa",
        "firstRequests": [
          {
            "input": "We need to change the owner of workspace #1."
          },
          {
            "input": "I was charged for an extra seat on workspace #2. Could you check the invoice?"
          },
          {
            "input": "Can I book a demo of the enterprise features? Our enquiry reference is #3."
          },
          {
            "input": "I was charged for an extra seat on workspace #4. Could you check the invoice?"
          },
          {
            "input": "Can we get a walkthrough before buying? Our team reference is #5."
          },
          {
            "input": "The invoice for account #6 needs our new company address."
          },
          {
            "input": "The invoice for account #7 needs our new company address."
          },
          {
            "input": "Please cancel my trial on account #8; I do not want it to renew."
          }
        ]
      },
      "limits": {
        "maxCalls": 10000,
        "maxConcurrent": 1,
        "timeoutMs": 1000
      },
      "counts": {
        "warmupBatches": 20,
        "measuredBatches": 100,
        "recordsVerified": 1200000,
        "expectedCategoriesPerBatch": {
          "model_review": 3442,
          "billing": 2229,
          "sales": 1240,
          "technical": 3089
        },
        "observedCategoriesPerBatch": {
          "model_review": 3442,
          "billing": 2229,
          "sales": 1240,
          "technical": 3089
        },
        "literalRuleChecksPerBatch": 41326,
        "callbackAttemptsPerBatch": {
          "total": 10000,
          "local": 10000,
          "model": 0
        },
        "providerCallsPerBatch": 0
      },
      "output": {
        "stableResultSha256": "2971751c730313348f1845e3bc93ffb710b536d6dc85c939dc5d3fbd75f9311f",
        "firstResults": [
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "charged",
            "handlerId": "billing",
            "output": {
              "category": "billing",
              "providerCalled": false,
              "reviewRequired": false
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "demo",
            "handlerId": "sales",
            "output": {
              "category": "sales",
              "providerCalled": false,
              "reviewRequired": false
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "charged",
            "handlerId": "billing",
            "output": {
              "category": "billing",
              "providerCalled": false,
              "reviewRequired": false
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": null,
            "handlerId": "model_review",
            "output": {
              "category": "model_review",
              "providerCalled": false,
              "reviewRequired": true
            }
          },
          {
            "status": "completed",
            "path": "local",
            "routeId": "cancel",
            "handlerId": "billing",
            "output": {
              "category": "billing",
              "providerCalled": false,
              "reviewRequired": false
            }
          }
        ]
      },
      "batchMilliseconds": {
        "median": 33.20670799999971,
        "p95": 35.88349999999991,
        "min": 31.913666999999805,
        "max": 66.18754200000012
      },
      "samplesMilliseconds": [
        32.99929099999986,
        33.71329199999991,
        35.375499999999874,
        32.87420799999995,
        32.69879199999991,
        33.659832999999935,
        34.42879199999993,
        34.256665999999996,
        34.57687499999997,
        33.599874999999884,
        33.488791999999876,
        35.88349999999991,
        33.050208999999995,
        33.28037500000005,
        48.833875000000035,
        32.90770799999996,
        32.11433299999999,
        32.03558399999997,
        32.75279199999977,
        34.33670799999982,
        32.361625000000004,
        32.07029199999988,
        33.45658300000014,
        32.7565410000002,
        32.124667000000045,
        33.00279099999989,
        32.3034160000002,
        34.84199999999964,
        33.11304199999995,
        32.48770800000011,
        32.8635419999996,
        32.650666,
        32.89762500000006,
        33.10729200000014,
        35.001666000000114,
        35.00545800000009,
        33.02845800000023,
        32.520958000000064,
        32.25320899999997,
        33.34516699999995,
        34.96204200000011,
        35.155083000000104,
        34.047250000000076,
        33.22499999999991,
        34.77749999999969,
        34.772791999999754,
        66.18754200000012,
        35.430541000000176,
        33.4092499999997,
        33.22729100000015,
        36.757290999999896,
        33.6836659999999,
        33.81566699999985,
        32.53604200000018,
        32.242917000000034,
        33.00075000000015,
        32.989250000000084,
        34.81379199999992,
        35.647457999999915,
        34.93804200000022,
        32.9027500000002,
        32.195916000000125,
        31.913666999999805,
        32.07358299999987,
        31.94708300000002,
        32.890542000000096,
        33.14716599999974,
        35.32445800000005,
        33.6220830000002,
        32.108124999999745,
        33.37908299999981,
        35.83470899999975,
        33.36112499999945,
        32.6738749999995,
        32.7817500000001,
        32.27808300000015,
        34.43016700000044,
        53.94145800000024,
        35.83745799999997,
        33.89929099999972,
        33.32325000000037,
        32.16758300000038,
        32.20616699999937,
        33.675792,
        35.55633299999954,
        33.484042000000045,
        32.298000000000684,
        32.781708000000435,
        33.20670799999971,
        32.98608299999978,
        32.96124999999938,
        34.35533300000043,
        34.25395800000024,
        32.628208000000086,
        33.10979099999986,
        32.80199999999968,
        33.446750000000065,
        36.0908330000002,
        33.05737500000032,
        32.584249999999884
      ]
    }
  ]
}
