A useful chatbot policy does not need to generate language. It can make a much smaller decision: should this question receive a definition, an example, a comparison, or an explanation that the topic is outside the knowledge base?

ReLU.chat uses a 25-input network with two ReLU hidden layers, 128 and 64 units wide. Its 13,079 parameters choose response behavior. The sentence-embedding model is separate and stays frozen. That distinction makes CPU training practical.

Define the experiment before training

One question is one episode. The state contains retrieval scores, intent signals, entity matches, and conversation features. Actions choose mode, intent, topic count, fragment count, and tone. The reward measures agreement with authored routing labels.

This is a contextual bandit. It does not optimize a long conversation trajectory. Calling it conversational intelligence would overstate what the experiment measures. The appropriate comparisons are the previous policy, a supervised-only checkpoint, and the reward-trained candidate.

Keep the exported computation identical

An earlier training path inserted LayerNorm between linear layers, while browser inference omitted it. Learned weights alone cannot reproduce that missing operation. The replacement trainer uses exactly the browser’s linear–ReLU–linear–ReLU computation.

Feature scaling happens during training. Before export, each first-layer weight column is divided by its feature scale. The deployed network therefore consumes the same raw features as the JavaScript extractor. Numerical fixtures compare exported Python predictions with JavaScript and WASM outputs.

The September 2026 run

The dataset contains 2,688 authored cases: 1,830 training, 420 validation, and 438 test cases. Topics are separated across all three splits. Training question templates differ from the templates used for validation and testing. Follow-up cases are tied to their topic split. No user conversations are included.

Supervised warm-start training is followed by fresh, on-policy REINFORCE samples. An action-independent expected-reward baseline reduces variance. The run completed training, evaluation, and export in 3.10 seconds on the development laptop. This is one local measurement, not a timing guarantee for every device.

Joint mode-and-intent accuracy on the held-out cases was 93.6% for the old policy, 98.6% for supervised training, and 98.6% after REINFORCE. The supervised and RL checkpoints tied on this test metric; the RL stage did not add a measured test-accuracy gain. The distinction matters when deciding whether extra training complexity earns its keep.

Reproduce and inspect

The repository includes build-policy-dataset.mjs, train-policy-fast.py, and verify-fast-policy.mjs under dev/scripts. The fast trainer needs NumPy, limits numerical-library threads, and enforces a wall-clock deadline. The release also has an external process timeout.

Keep the best checkpoint according to validation, then run the untouched test split once for acceptance. Separately check real answers, unsupported questions, follow-ups, and model-loading failures. Routing accuracy cannot establish factual correctness, useful prose, or user satisfaction.

Inspect the published evaluation summary, then explore reinforcement learning.