Blog
Technical articles about on-device AI, browser-based chatbots, NLP, reinforcement learning, and privacy-first machine learning.
Accessibility in AI Chatbots: WCAG Compliance for Conversational UI
How to make browser-based chatbots accessible: ARIA landmarks, keyboard navigation, reduced motion, and contrast compliance.
Read article →Progressive Loading: BOW to MLP to Transformer in 3 Stages
The three-stage loading strategy that gives usable answers instantly while the 22MB transformer model streams in.
Dense-Sparse Ensemble Ranking: Combining BM25 and Embeddings
How fusing dense cosine similarity with BM25 sparse scores at 70/30 weights produces better retrieval than either alone.
Topic Correction: When Users Say 'No, I Meant X'
How explicit topic correction detection prevents chatbot topic drift when users redirect the conversation mid-turn.
Follow-Up Detection: 20 Patterns That Make Chatbots Conversational
How regex pattern matching and heuristic detection handle 20+ follow-up types from 'how?' to 'tell me more' to emoji-only responses.
BM25 in the Browser: Field-Weighted Sparse Retrieval Without a Server
Implementing field-weighted BM25 with bigram phrase matching entirely in JavaScript for real-time knowledge retrieval.
Service Worker Model Pre-Caching: Zero-Wait Chatbot Loading
How service workers pre-cache the 22MB transformer model and policy weights for instant chatbot startup.
Session Memory Architecture: 30 Turns of Context Without a Server
How importance-based eviction, response compression, and EMA summary vectors maintain long conversation context entirely in the browser.
Progressive Streaming Rendering: Making Chatbots Feel Native
How progressive response rendering with requestAnimationFrame creates a natural typing effect in browser chatbots.
Int8 Quantization in the Browser: How We Made MLP Inference 4x Faster
How symmetric int8 quantization reduces memory and speeds up policy network inference in pure JavaScript.
ONNX Runtime Web and INT8 Quantization: How 90MB Models Become 22MB
A practical look at how ONNX Runtime Web plus INT8 post-training quantization shrinks a 90MB sentence transformer to roughly 22MB, with only a small accuracy loss, and why that tradeoff is exactly right for in-browser NLP.
BM25 vs Dense Retrieval: Why We Use Both for Browser Chatbots
BM25 is fast and exact; dense embeddings are semantic and forgiving. For real user queries — many of them short, typo-prone, or relying on jargon — neither wins alone. Here is why hybrid retrieval is the right default.
Service Workers and PWA Caching for Offline AI Chatbots
A service worker can pre-cache the 22MB ONNX model, the embedding index, and the chatbot shell so the entire experience keeps working after the first load — even on a plane.
WebGPU and the Future of In-Browser AI Inference
WebGPU has shipped in stable Chrome, Edge, Firefox, and Safari. For in-browser ML, it is the unlock that makes 7B-parameter models possible without a server. Here is what it actually changes — and what it does not.
Knowledge Fragment Composition: Why We Ditched Generation for Retrieval
Generation is flexible and dangerous; retrieval is rigid and safe. For domain-specific chatbots where accuracy matters more than creativity, retrieval + fragment composition wins. Here is the design and the tradeoffs.
Sentence Embeddings Explained: Why 384 Dimensions and What They Mean
384 is a specific number with a specific history. It is the output dimension of MiniLM-L6-v2, a distilled sentence transformer. Here is what those dimensions actually encode, why the number is what it is, and why it is the right size for browser NLP.
PPO and Reward Design: Training a Chatbot Policy Network That Actually Works
The hardest part of training a chatbot policy network is not the algorithm — it is the reward function. A bad reward produces a model that optimizes for the wrong thing. Here is the function we use, what we tried that did not work, and what we learned about the dark art of reward shaping.
Heuristic Fallback for Cold Start: Graceful Degradation in Browser AI
A 22MB model takes seconds to load, and users will not wait. A heuristic fallback gives a working chatbot on first paint and hot-swaps to the full transformer when the model finishes downloading. Here is how the pattern works and what it costs.
Linguistic Connectors: The Small Detail That Makes Retrieval Bots Sound Human
A retrieval chatbot that just concatenates fragments sounds robotic. Connectors — small transitional phrases — turn a list of facts into a coherent response. Here is the small but important design decision that affects how a knowledge-grounded bot feels to talk to.
Sentence Embeddings vs Word Embeddings: Why We Embed Whole Questions
Word embeddings (Word2Vec, GloVe) capture the meaning of individual words. Sentence transformers (MiniLM, SBERT) capture the meaning of a whole phrase. For Q&A retrieval, only the second is useful. Here is why averaging word vectors fails, and what sentence-level embeddings do differently.

Privacy-First AI: Why Browser-Based Machine Learning Matters
An argument for why browser-based machine learning is the future of privacy-first AI, and how ReLU.chat achieves zero data collection.

Training Chatbots with Reinforcement Learning: The ReLU.chat Approach
An exploration of how reinforcement learning trains a lightweight MLP policy network to compose chatbot responses from knowledge fragments, without any LLM dependency.

How Browser-Based Chatbots Work: A Deep Dive into On-Device NLP
A technical deep dive into how modern browser-based chatbots run full NLP pipelines client-side using quantized ONNX models, BM25 retrieval, and RL-trained policy networks.