# ReLU.chat — Architecture and Learning Resources > Six free, open-source learning assistants. Questions are processed locally; page and optional model downloads use the network. ## Chatbots - [Game Theory Chat](https://relu.chat/chat/game-theory-chat/) — On-device NLU assistant for game theory concepts 80 topics. - [Golden Age Inquiry](https://relu.chat/chat/golden-age-inquiry/) — Explore Islamic Golden Age science and philosophy 50 topics. - [Data Science Chat](https://relu.chat/chat/data-science-chat/) — On-device NLU assistant for data science and ML concepts 41 topics. - [Reinforcement Learning Chat](https://relu.chat/chat/reinforcement-learning-chat/) — Learn how agents choose actions: rewards, value functions, bandits, Q-learning, and policy gradients. 16 topics. - [Linear Algebra Chat](https://relu.chat/chat/linear-algebra-chat/) — Build intuition for vectors, matrices, eigenvalues, projections, and the linear algebra behind machine learning. 16 topics. - [Web Platform Chat](https://relu.chat/chat/web-platform-chat/) — Understand browser JavaScript, HTTP caching, WebAssembly, workers, accessibility, and local data storage. 16 topics. ## How the current release works 1. The selected knowledge base starts with keyword vectors and field-weighted BM25. No large model download is required to ask a question. 2. Explicit entity and intent cues guide retrieval. Follow-ups retain the last topic, while a newly named topic takes precedence. 3. A 13,079-parameter policy has 25 inputs, 128 and 64 ReLU hidden units, and six action heads. It runs in verified WebAssembly or JavaScript, with a heuristic fallback. Float32 weights are used by default; int8 is optional. 4. Complete answers are assembled from curated fragments and rendered with math and available source links. These assistants do not generate arbitrary text, execute code, or solve arbitrary exercises. 5. Enhanced matching is optional: a button downloads the approximately 22 MB quantized MiniLM model plus runtime assets. The browser prepares the complete embedding set before switching, clears incompatible query vectors, and can cache public knowledge vectors in IndexedDB. 6. Conversations stay in memory unless the user saves a text file. Cached pages and assets support offline reuse; an unvisited page needs a connection. The service worker does not prefetch the large model. ## Evaluation and limits The September 9, 2026 CPU training run took 3.10 seconds. On 438 authored held-out routing cases, joint mode/intent accuracy rose from 93.6% for the previous policy to 98.6% for the new policy. The RL stage matched supervised training on this test. These are routing measurements, not factual-answer accuracy or real-user satisfaction. Topics are disjoint across training, validation, and test splits; training templates differ from validation/test templates. The fixed-memory WASM module uses 128 KiB and matches JavaScript outputs on 40 exported fixtures. Both paths took around 14 microseconds in the recorded policy microbenchmark; no WASM speed advantage is claimed. Optimized BM25 preserved original scores and rankings on 30 benchmark queries, with median scoring time falling from 16.67 ms to 0.073 ms on the measured laptop. End-to-end browser latency varies. - [Architecture and limits](https://relu.chat/how-it-works.html) - [Reproducible evaluation results](https://relu.chat/data/policy-evaluation.json) - [Six interactive ML tools](https://relu.chat/tools/) - [Source repository](https://github.com/yunusemrejr/relu-chat) ## Privacy and network use Chat questions are not sent to a language-generation API. The host receives normal page and asset requests. Optional model downloads use the site origin. Following external links, purchasing an ebook, or submitting a separate signup form involves the respective service. Browser storage contains public assets and knowledge embeddings, not saved chat transcripts. ## Book - [How to Remain Valuable When Intelligence Becomes Cheap](https://theknowledgeproject.gumroad.com/l/remainvaluable) — a 224-page practical guide to the human, economic, and strategic advantages that stay valuable when AI can perform most cognitive work. PDF and EPUB. ## Learning guides 82 original technical articles at https://relu.chat/blog/ (RSS: https://relu.chat/blog/feed.xml): - 2026-10-04 — [Greedy vs Beam Search Decoding](https://relu.chat/blog/greedy-vs-beam-search-decoding/) — Greedy decoding is fast but myopic; beam search explores alternatives at k times the cost. Learn both, plus sampling, with selection guidance and code. - 2026-10-03 — [Dropout and Regularization for Tiny MLPs](https://relu.chat/blog/dropout-regularization-tiny-mlp/) — Tiny MLPs memorize small datasets fast. Learn dropout mechanics, when it hurts small layers, weight decay, early stopping, and a full recipe. - 2026-10-02 — [Learning Rate Schedules for Small Networks](https://relu.chat/blog/learning-rate-schedules-small-networks/) — Learning rate schedules start bold and finish careful. Learn step, cosine, and warmup schedules, base-rate selection, and tiny-budget practice. - 2026-10-01 — [Softmax and Temperature Explained](https://relu.chat/blog/softmax-temperature-explained/) — Softmax turns neural scores into probabilities; temperature controls their sharpness. Learn the mechanics, calibration, and small-policy uses with code. - 2026-09-30 — [Feature Normalization for Machine Learning Beginners](https://relu.chat/blog/feature-normalization-ml-beginners/) — Feature normalization speeds training and fixes distorted distances. Learn standardization, min-max scaling, text-vector norms, and inference folding. - 2026-09-29 — [Perplexity Explained: Measuring Language Models](https://relu.chat/blog/perplexity-language-models-explained/) — Perplexity measures how well language models predict text. Learn what the number means, its limits, and how to use it for small on-device models. - 2026-09-28 — [BLEU and ROUGE: Text Generation Metrics Explained](https://relu.chat/blog/bleu-rouge-text-metrics-explained/) — BLEU and ROUGE score generated text with n-gram overlap. Learn how each works, what scores mean, their blind spots, and practical use. - 2026-09-27 — [Cross-Validation for Small ML Datasets](https://relu.chat/blog/cross-validation-small-ml-datasets/) — Cross-validation makes small ML datasets go further. Learn k-fold splits, stratification, grouped folds, and choosing k, with code. - 2026-09-26 — [Confusion Matrices for Intent Classification](https://relu.chat/blog/confusion-matrix-intent-classification/) — Confusion matrices reveal exactly where intent classifiers fail. Learn to build, read, and act on them with per-class precision and recall. - 2026-09-25 — [Building Offline Test Sets for Chatbots](https://relu.chat/blog/chatbot-evaluation-offline-test-sets/) — Offline test sets catch chatbot regressions before release. Learn what to include, how to grade automatically, and how to keep the set honest. - 2026-09-24 — [Improving FAQ Chatbot Accuracy](https://relu.chat/blog/faq-chatbot-accuracy-improvement/) — FAQ chatbots fail in predictable ways with concrete fixes. Improve entries, paraphrases, retrieval tuning, and no-match handling in priority order. - 2026-09-23 — [Extractive Summarization for Long Answers](https://relu.chat/blog/summarization-extractive-browser/) — Extractive summarization picks the sentences that matter, guaranteeing faithful summaries. Learn frequency scoring, redundancy removal, and chatbot uses. - 2026-09-22 — [Keyword Extraction Basics: RAKE and TextRank](https://relu.chat/blog/keyword-extraction-rake-textrank-basics/) — RAKE and TextRank extract document keywords with no training data. Learn how each works, when to choose which, and how to use them in the browser. - 2026-09-21 — [Lightweight Sentiment Analysis in the Browser](https://relu.chat/blog/sentiment-analysis-browser-no-server/) — Detect user sentiment on device with lexicons and tiny classifiers: scoring code, negation handling, intensifiers, and how to use the signal well. - 2026-09-20 — [Client-Side Language Detection for Chat](https://relu.chat/blog/language-detection-browser-chat/) — Detect chat message language in the browser with character n-grams: no model download, kilobyte profiles, and microsecond decisions. Includes code. - 2026-09-19 — [Spell Correction and Typo Tolerance for Chatbots](https://relu.chat/blog/spell-correction-typo-tolerance-chatbots/) — Typo tolerance makes chatbots feel intelligent with no model required. Learn edit-distance correction, vocabulary building, and safe pipeline placement. - 2026-09-18 — [Autocomplete with Tries: Prefix Search in the Browser](https://relu.chat/blog/autocomplete-prefix-search-trie/) — Autocomplete dropdowns usually run on a trie, a prefix tree that finds completions in microseconds. Learn to build and rank one in the browser. - 2026-09-17 — [How Inverted Indexes Power Browser Search](https://relu.chat/blog/inverted-index-browser-search/) — The inverted index maps each term to its documents, making browser search instant. Learn its structure, build one in JavaScript, and see how it fits retrieval. - 2026-09-16 — [Stop Words and Stemming for Small Retrieval Indexes](https://relu.chat/blog/stop-words-stemming-small-retrieval/) — Stop-word removal and stemming shrink small search indexes and improve matches. Learn how they work, when they hurt, and how to implement them in the browser. - 2026-09-15 — [TF-IDF Explained: The Search Formula Behind Keyword Ranking](https://relu.chat/blog/tf-idf-explained-search-beginners/) — TF-IDF is the classic keyword scoring formula behind search and chatbot retrieval. Learn term frequency and inverse document frequency with a worked example and browser code. - 2026-09-09 — [Dot Product and Cosine Similarity, Step by Step](https://relu.chat/blog/dot-product-cosine-worked-example/) — Work through a dot product, vector norms, and cosine similarity, including the zero-vector case that retrieval code must handle. - 2026-09-09 — [Data Leakage: Split by Entity Before You Train](https://relu.chat/blog/grouped-validation-leakage/) — Why random row splits overstate performance on repeated users, devices, or experiments, and how grouped validation changes the question. - 2026-09-09 — [Least Squares Without Computing an Inverse](https://relu.chat/blog/least-squares-without-inverse/) — Derive a two-parameter fit, check its residuals, and understand why practical solvers use QR or SVD instead of an explicit inverse. - 2026-09-09 — [Local Chat Privacy: What Still Uses the Network?](https://relu.chat/blog/local-chat-privacy-network/) — Distinguish local question processing from page downloads, browser storage, external links, and offline availability. - 2026-09-09 — [Find a Nash Equilibrium with Best Responses](https://relu.chat/blog/nash-equilibrium-best-response-table/) — Check a complete 2×2 game, identify two pure equilibria, and distinguish unilateral stability from efficiency. - 2026-09-09 — [Precision and Recall: A 100-Case Example](https://relu.chat/blog/precision-recall-small-example/) — Compute precision, recall, accuracy, and F1 from the same small confusion matrix, then connect thresholds to the errors you care about. - 2026-09-09 — [Q-learning vs SARSA: One Update, Worked Through](https://relu.chat/blog/q-learning-sarsa-worked-example/) — Calculate Q-learning and SARSA updates on the same transition, and see why their targets differ during exploration. - 2026-09-09 — [Rank, SVD, and Conditioning: Three Different Questions](https://relu.chat/blog/rank-svd-conditioning/) — Use a diagonal matrix to distinguish exact rank, low-rank approximation, and sensitivity to numerical perturbations. - 2026-09-09 — [How to Read Claims About Medieval Islamic Science](https://relu.chat/blog/reading-islamic-science-sources/) — Distinguish a scholar’s work, surviving manuscripts, later biographies, and modern interpretations without reducing history to invention lists. - 2026-09-09 — [Reward Design for a Small Learning Chatbot](https://relu.chat/blog/reward-design-small-chatbot/) — Design routing rewards without confusing longer answers, topic overlap, or training scores with useful explanations. - 2026-09-09 — [Termination vs Truncation in RL Targets](https://relu.chat/blog/rl-termination-truncation/) — A small numerical example shows why environment termination and time-limit truncation should not share one done flag. - 2026-09-09 — [Service Worker Updates Without Stale Model Weights](https://relu.chat/blog/service-worker-model-updates/) — Separate stable embedding assets from mutable policies, avoid eager runtime downloads, and test update and offline failure paths. - 2026-09-09 — [Training a Chatbot Policy on a Laptop](https://relu.chat/blog/tiny-policy-training-cpu/) — A reproducible CPU training recipe, a real three-second run, and the limits of routing metrics on a small contextual-bandit policy. - 2026-09-09 — [WASM vs JavaScript: Verify the Same Model First](https://relu.chat/blog/wasm-javascript-policy-parity/) — A small MLP shows why export parity, fixed memory, startup costs, and end-to-end latency matter more than assuming WASM is faster. - 2026-08-06 — [Measuring Retrieval Quality: Precision, Recall, MRR and NDCG](https://relu.chat/blog/retrieval-metrics-precision-recall-mrr/) — Retrieval quality is measured with four standard metrics: precision and recall for top-k usefulness, MRR for how early the first good answer appears, and NDCG for graded relevance with position discounting — tuned against a small labeled eval set. - 2026-08-06 — [Chunking Strategies for Knowledge Bases: Splitting Text for Retrieval](https://relu.chat/blog/chunking-strategies-knowledge-base/) — Chunk size, boundaries, and overlap decide what a knowledge base retriever can find; structure-aware chunks serve hybrid BM25-plus-dense retrieval best. - 2026-08-06 — [Query Expansion Without an LLM: Synonyms, Spelling and Boosting](https://relu.chat/blog/query-expansion-without-llm/) — Query expansion without an LLM combines index-time alias weighting, lower-weighted query-side synonyms from entity extraction, edit-distance spelling correction that protects proper nouns, and a dense/sparse re-ranking stage. - 2026-08-06 — [How Knowledge Bases Are Structured: Fragments, Fields and Metadata](https://relu.chat/blog/knowledge-base-fragments-fields-metadata/) — Knowledge bases work best when entries are split into typed fragments, names and aliases are field-weighted for BM25, and metadata steers ranking and policy. - 2026-08-06 — [IndexedDB for On-Device AI: Storing Embeddings and Session State Locally](https://relu.chat/blog/indexeddb-client-storage/) — IndexedDB stores embeddings as raw binary and session state as structured records, giving browser-based AI a complete local persistence story that never leaves the device. - 2026-08-06 — [Float32 vs Float64: Precision Trade-Offs for In-Browser ML](https://relu.chat/blog/float32-vs-float64-precision/) — JavaScript numbers are float64 but ML tensors default to float32. Use float32 for model I/O and similarity scoring, float64 for accumulators and iterative updates where error compounds, and int8 quantization to shrink weights in memory. - 2026-08-06 — [The Real Cost of Cosine Similarity: Optimizing Vector Math in JavaScript](https://relu.chat/blog/browser-vector-math-optimization/) — Cosine similarity looks cheap but is O(N) per query in the browser; precomputed norms, typed arrays, bounded top-k, and memoization cut the real cost. - 2026-08-06 — [Offline-First Chat Architecture: Queues, Retries and Sync-Free Design](https://relu.chat/blog/offline-first-chat-architecture/) — Offline-first is the natural architecture for browser-based chat: persist the turn pipeline as a queue, retry with backoff and idempotent steps, and embrace sync-free design where a single local copy of state eliminates conflict resolution entirely. - 2026-08-06 — [Model Size vs Quality: Why a Small Distilled Model Can Beat a Big One on Edge Devices](https://relu.chat/blog/model-size-vs-quality/) — Quality is task-relative. A small distilled model fine-tuned for a narrow task — quantized, cache-local, paired with strong retrieval — can beat a much larger general model on edge devices. - 2026-08-06 — [Conversation State Machines: Modes, Intents and Follow-Up Routing](https://relu.chat/blog/conversation-state-machines/) — Modes, intents, and follow-up routing form a conversation state machine: persistent states, per-turn actions, and a routing table that ties them together. - 2026-08-06 — [Debugging In-Browser ML: Profiling, Logging and Graceful Fallbacks](https://relu.chat/blog/debugging-browser-ml/) — Debugging ML that runs in the browser needs three layers of defense: profiling each inference stage, logging structured on-device events, and building a graceful fallback ladder so a model failure degrades to a slower answer instead of a blank page. - 2026-08-06 — [Bias in Retrieval Chatbots: Where It Comes From and How to Audit It](https://relu.chat/blog/bias-in-retrieval-chatbots/) — Bias enters retrieval chatbots through the corpus, embeddings, term weighting, ranking fusion, and entity extraction; this article shows how to audit each stage. - 2026-08-05 — [Privacy Checklist for Browser-Based AI: What Actually Leaves Your Device](https://relu.chat/blog/privacy-checklist-browser-ai/) — A six-step audit for browser-based AI: inventory first-load requests, watch live conversations, test offline, inspect storage, and read the source. - 2026-08-04 — [Named Entity Recognition Without an LLM: Regex, Fuzzy Matching, and Knowledge Bases](https://relu.chat/blog/named-entity-recognition-no-llm/) — For closed domains, NER does not need an LLM: exact alias regex, fuzzy matching with Levenshtein, notation patterns, and a knowledge base extract entities in milliseconds, on-device. - 2026-08-04 — [The Math of BM25: A Worked Example of Sparse Retrieval](https://relu.chat/blog/bm25-math-worked-example/) — A hand-computed BM25 ranking example showing smoothed IDF, term-frequency saturation, length normalization, and field weighting via term repetition. - 2026-08-04 — [WebAssembly and On-Device ML: Why WASM Makes Browser AI Fast](https://relu.chat/blog/webassembly-browser-ml/) — WebAssembly lets C and Rust numeric kernels run at near-native speed in the browser, and it is the substrate under on-device ML runtimes like ONNX Runtime and transformers.js. - 2026-08-03 — [Latency Budgets for Conversational UI: The 400ms Response Rule](https://relu.chat/blog/latency-budgets-conversational-ui/) — Users experience latency as time to first token, not time to completion. Budget 400 ms for that first token on your slowest device, and stream everything after it. - 2026-08-03 — [KaTeX vs MathJax: Rendering Math in the Browser](https://relu.chat/blog/katex-vs-mathjax-math-rendering/) — A practical comparison of KaTeX and MathJax for in-browser math rendering: speed, bundle size, TeX coverage, accessibility, and streaming output. - 2026-08-03 — [INT8 Quantization Explained: From FP32 to 8-Bit Without Losing Accuracy](https://relu.chat/blog/int8-quantization-explained/) — INT8 quantization maps a model's weights and activations onto 256 integer buckets, cutting memory 4x while usually keeping accuracy — the key to fitting models in a browser. - 2026-08-02 — [Cosine Similarity and Vector Search: The Math Behind Semantic Retrieval](https://relu.chat/blog/cosine-similarity-vector-search/) — Cosine similarity measures the angle between embeddings, and with normalized vectors it becomes a tight dot-product loop that powers semantic retrieval entirely in the browser. - 2026-08-02 — [Memory Management in Long Browser Chat Sessions: Avoiding Leaks](https://relu.chat/blog/memory-leaks-long-chat-sessions/) — How bounded turn buffers, importance-based eviction, response compression, and cache discipline keep long browser chat sessions from leaking memory. - 2026-08-02 — [Service Worker Caching Strategies for ML Assets](https://relu.chat/blog/service-worker-caching-strategies/) — Model weights are immutable and large, which makes them ideal cache-first assets. A practical guide to service worker strategies for ML: precache, versioning, and quota. - 2026-08-01 — [Intent Classification with Prototype Embeddings: Zero-Shot Style Without an LLM](https://relu.chat/blog/prototype-intent-classification/) — Prototype embeddings classify intent with cosine similarity against reference vectors — no LLM, no training data, and no server round-trip. - 2026-08-01 — [Subword Tokenization for On-Device NLP: How BPE Works](https://relu.chat/blog/tokenization-subword-bpe-on-device/) — Byte Pair Encoding builds a compact subword vocabulary by merging the most frequent character pairs, and it is why small on-device models can handle full natural language without giant embedding tables. - 2026-08-01 — [Web Workers: Keeping the UI Thread Responsive During Inference](https://relu.chat/blog/web-workers-ui-thread/) — Inference is compute, and compute does not belong on the UI thread. Here is how dedicated workers, transferable buffers, and worker pools keep a browser-based AI chatbot responsive. - 2026-06-30 — [Accessibility in AI Chatbots: WCAG Compliance for Conversational UI](https://relu.chat/blog/accessibility-ai-chatbots-wcag/) — How to make browser-based chatbots accessible: ARIA landmarks, keyboard navigation, reduced motion, and contrast compliance. - 2026-06-30 — [Progressive Loading: BOW to MLP to Transformer in 3 Stages](https://relu.chat/blog/progressive-loading-bow-mlp-transformer/) — The three-stage loading strategy that gives usable answers instantly while the 22MB transformer model streams in. - 2026-06-30 — [Dense-Sparse Ensemble Ranking: Combining BM25 and Embeddings](https://relu.chat/blog/dense-sparse-ensemble-ranking/) — How fusing dense cosine similarity with BM25 sparse scores at 70/30 weights produces better retrieval than either alone. - 2026-06-30 — [Topic Correction: When Users Say 'No, I Meant X'](https://relu.chat/blog/topic-correction-when-users-redirect/) — How explicit topic correction detection prevents chatbot topic drift when users redirect the conversation mid-turn. - 2026-06-30 — [Follow-Up Detection: 20 Patterns That Make Chatbots Conversational](https://relu.chat/blog/follow-up-detection-20-patterns/) — How regex pattern matching and heuristic detection handle 20+ follow-up types from 'how?' to 'tell me more' to emoji-only responses. - 2026-06-30 — [BM25 in the Browser: Field-Weighted Sparse Retrieval Without a Server](https://relu.chat/blog/bm25-browser-field-weighted-retrieval/) — Implementing field-weighted BM25 with bigram phrase matching entirely in JavaScript for real-time knowledge retrieval. - 2026-06-30 — [Service Worker Model Pre-Caching: Zero-Wait Chatbot Loading](https://relu.chat/blog/service-worker-model-pre-caching/) — How service workers pre-cache the 22MB transformer model and policy weights for instant chatbot startup. - 2026-06-30 — [Session Memory Architecture: 30 Turns of Context Without a Server](https://relu.chat/blog/session-memory-architecture-30-turns/) — How importance-based eviction, response compression, and EMA summary vectors maintain long conversation context entirely in the browser. - 2026-06-30 — [Progressive Streaming Rendering: Making Chatbots Feel Native](https://relu.chat/blog/progressive-streaming-rendering-chatbots/) — How progressive response rendering with requestAnimationFrame creates a natural typing effect in browser chatbots. - 2026-06-30 — [Int8 Quantization in the Browser: How We Made MLP Inference 4x Faster](https://relu.chat/blog/int8-quantization-browser-mlp/) — How symmetric int8 quantization reduces memory and speeds up policy network inference in pure JavaScript. - 2026-06-10 — [ONNX Runtime Web and INT8 Quantization: How 90MB Models Become 22MB](https://relu.chat/blog/onnx-runtime-web-quantization/) — 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. - 2026-06-09 — [BM25 vs Dense Retrieval: Why We Use Both for Browser Chatbots](https://relu.chat/blog/bm25-vs-dense-retrieval/) — 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. - 2026-06-08 — [Service Workers and PWA Caching for Offline AI Chatbots](https://relu.chat/blog/service-workers-offline-ai/) — 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. - 2026-06-07 — [WebGPU and the Future of In-Browser AI Inference](https://relu.chat/blog/webgpu-future-browser-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. - 2026-06-06 — [Knowledge Fragment Composition: Why We Ditched Generation for Retrieval](https://relu.chat/blog/knowledge-fragment-composition/) — 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. - 2026-06-05 — [Sentence Embeddings Explained: Why 384 Dimensions and What They Mean](https://relu.chat/blog/sentence-embeddings-384-dim-minilm/) — 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. - 2026-06-04 — [PPO and Reward Design: Training a Chatbot Policy Network That Actually Works](https://relu.chat/blog/ppo-reward-design-policy-network/) — 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. - 2026-06-03 — [Heuristic Fallback for Cold Start: Graceful Degradation in Browser AI](https://relu.chat/blog/heuristic-fallback-cold-start/) — 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. - 2026-06-02 — [Linguistic Connectors: The Small Detail That Makes Retrieval Bots Sound Human](https://relu.chat/blog/linguistic-connectors-naturalness/) — 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. - 2026-06-01 — [Sentence Embeddings vs Word Embeddings: Why We Embed Whole Questions](https://relu.chat/blog/sentence-vs-word-embeddings/) — 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. - 2026-05-25 — [Privacy-First AI: Why Browser-Based Machine Learning Matters](https://relu.chat/blog/privacy-first-ai-browsers/) — An argument for why browser-based machine learning is the future of privacy-first AI, and how ReLU.chat achieves zero data collection. - 2026-05-22 — [Training Chatbots with Reinforcement Learning: The ReLU.chat Approach](https://relu.chat/blog/reinforcement-learning-for-chatbots/) — An exploration of how reinforcement learning trains a lightweight MLP policy network to compose chatbot responses from knowledge fragments, without any LLM dependency. - 2026-05-20 — [How Browser-Based Chatbots Work: A Deep Dive into On-Device NLP](https://relu.chat/blog/how-browser-based-chatbots-work/) — 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. ## Development The repository contains the shared runtime in core/, policy inference in policy/, six chatbot pages in chat/, and authored knowledge in data/bots/. The bounded CPU trainer is dev/scripts/train-policy-fast.py; its maximum allowed training budget is 540 seconds. See README.md for dataset, training, parity, and regression commands. Source code is MIT licensed. ## Learn: 219 explained topics ### Game theory - [Nash Equilibrium](https://relu.chat/learn/game-theory/nash-equilibrium/): A profile of strategies where no player can profit by unilateral deviation. - [Prisoner's Dilemma](https://relu.chat/learn/game-theory/prisoners-dilemma/): Canonical 2x2 game where individually rational defection leads to a Pareto-inferior outcome. - [Dominant Strategy](https://relu.chat/learn/game-theory/dominant-strategy/): A strategy that yields at least as high a payoff as any alternative regardless of others' play. - [Mixed Strategy](https://relu.chat/learn/game-theory/mixed-strategy/): A probability distribution over a player's pure strategies. - [Pure Strategy](https://relu.chat/learn/game-theory/pure-strategy/): A deterministic choice of an action from a player's strategy set. - [Zero-Sum Game](https://relu.chat/learn/game-theory/zero-sum-game/): A game in which one player's gain exactly offsets the others' losses. - [Cooperative Game](https://relu.chat/learn/game-theory/cooperative-game/): A game where binding agreements among coalitions are allowed; analysis focuses on joint payoffs. - [Non-Cooperative Game](https://relu.chat/learn/game-theory/non-cooperative-game/): A game in which binding agreements are not possible; each player chooses independently. - [Minimax Theorem](https://relu.chat/learn/game-theory/minimax-theorem/): In any finite two-player zero-sum game, max-min and min-max values coincide in mixed strategies. - [Extensive-Form Game](https://relu.chat/learn/game-theory/extensive-form-game/): A representation of sequential play using a rooted tree with information sets. - [Normal-Form Game](https://relu.chat/learn/game-theory/normal-form-game/): A simultaneous-move representation via strategy sets and payoff functions. - [Bayesian Game](https://relu.chat/learn/game-theory/bayesian-game/): A game in which players have private information (types) drawn from a common prior. - [Repeated Game](https://relu.chat/learn/game-theory/repeated-game/): A stage game played repeatedly, allowing histories to influence future play. - [Evolutionary Game Theory](https://relu.chat/learn/game-theory/evolutionary-game-theory/): Studies strategy frequencies in large populations under selection and mutation. - [Evolutionarily Stable Strategy](https://relu.chat/learn/game-theory/evolutionarily-stable-strategy/): A strategy that, if adopted by the population, cannot be invaded by any rare mutant. - [Replicator Dynamics](https://relu.chat/learn/game-theory/replicator-dynamics/): ODEs describing how strategy frequencies evolve under selection proportional to fitness. - [Stackelberg Competition](https://relu.chat/learn/game-theory/stackelberg-competition/): A sequential duopoly in which a leader commits to an output and the follower best-responds. - [Cournot Competition](https://relu.chat/learn/game-theory/cournot-competition/): A simultaneous-move duopoly/oligopoly with quantity as the strategic variable. - [Bertrand Competition](https://relu.chat/learn/game-theory/bertrand-competition/): Simultaneous price-setting competition among firms producing a homogeneous good. - [Auction Theory](https://relu.chat/learn/game-theory/auction-theory/): Study of resource allocation via bidding mechanisms. - [Vickrey Auction](https://relu.chat/learn/game-theory/vickrey-auction/): A sealed-bid auction where the highest bidder wins and pays the second-highest bid. - [Mechanism Design](https://relu.chat/learn/game-theory/mechanism-design/): Designing the rules of a game so that equilibrium behavior yields desired outcomes. - [Revelation Principle](https://relu.chat/learn/game-theory/revelation-principle/): Any equilibrium outcome of any mechanism can be reproduced by a direct truthful mechanism. - [Shapley Value](https://relu.chat/learn/game-theory/shapley-value/): A unique fair allocation in cooperative games satisfying efficiency, symmetry, dummy, and additivity. - [Core (of a Cooperative Game)](https://relu.chat/learn/game-theory/core-of-a-cooperative-game/): The set of coalition-stable payoff allocations. - [Coalition Formation](https://relu.chat/learn/game-theory/coalition-formation/): Study of which coalitions form and how they share surplus. - [Nash Bargaining Solution](https://relu.chat/learn/game-theory/nash-bargaining-solution/): The unique allocation satisfying Pareto-efficiency, symmetry, scale invariance, and IIA. - [Rubinstein Bargaining](https://relu.chat/learn/game-theory/rubinstein-bargaining/): A non-cooperative alternating-offers model of bargaining with a unique subgame-perfect outcome. - [Correlated Equilibrium](https://relu.chat/learn/game-theory/correlated-equilibrium/): An equilibrium in which players obey recommendations from a common randomization device. - [Subgame Perfect Equilibrium](https://relu.chat/learn/game-theory/subgame-perfect-equilibrium/): A Nash equilibrium that also prescribes a Nash equilibrium in every subgame. - [Perfect Bayesian Equilibrium](https://relu.chat/learn/game-theory/perfect-bayesian-equilibrium/): A refinement for dynamic games of incomplete information pairing strategies with beliefs. - [Trembling-Hand Perfection](https://relu.chat/learn/game-theory/trembling-hand-perfection/): An equilibrium robust to small probabilities of mistakes. - [Battle of the Sexes](https://relu.chat/learn/game-theory/battle-of-the-sexes/): A coordination game with asymmetric preferences over the two coordinated outcomes. - [Hawk-Dove Game](https://relu.chat/learn/game-theory/hawk-dove-game/): A symmetric 2x2 conflict game used to model animal contests. - [Stag Hunt](https://relu.chat/learn/game-theory/stag-hunt/): A coordination game where mutual cooperation on the risky action maximizes welfare. - [Chicken Game](https://relu.chat/learn/game-theory/chicken-game/): An anti-coordination game where both players prefer to yield if the other stays the course. - [Matching Pennies](https://relu.chat/learn/game-theory/matching-pennies/): A zero-sum 2 2 game with no pure equilibrium and a unique uniform mixed equilibrium. - [Ultimatum Game](https://relu.chat/learn/game-theory/ultimatum-game/): A two-stage bargaining game highlighting the gap between rational prediction and observed fairness. - [Centipede Game](https://relu.chat/learn/game-theory/centipede-game/): A multi-stage game where backward induction predicts immediate termination despite cooperative gains. - [Public-Goods Game](https://relu.chat/learn/game-theory/public-goods-game/): A game in which individuals contribute to a shared good; the efficient outcome is not individually rational. - [Tragedy of the Commons](https://relu.chat/learn/game-theory/tragedy-of-the-commons/): Overuse of a shared resource when individual users ignore the externality they impose on others. - [Signaling Games](https://relu.chat/learn/game-theory/signaling-games/): Dynamic incomplete-information games where an informed sender chooses a signal that a receiver observes. - [Screening Games](https://relu.chat/learn/game-theory/screening-games/): Games where an uninformed principal offers a menu of contracts to sort informed agents. - [Principal-Agent Problem](https://relu.chat/learn/game-theory/principal-agent-problem/): A contracting problem where an agent's action is unobservable to the principal. - [Folk Theorem](https://relu.chat/learn/game-theory/folk-theorem/): Any individually rational feasible payoff can be sustained in an infinitely repeated game with patient enough players. - [Tit-for-Tat](https://relu.chat/learn/game-theory/tit-for-tat/): A simple reciprocal strategy — cooperate first, then mimic the opponent's previous action. - [Backward Induction](https://relu.chat/learn/game-theory/backward-induction/): Algorithm for solving finite perfect-information games by reasoning from terminal nodes back to the root. - [Iterated Elimination of Dominated Strategies](https://relu.chat/learn/game-theory/iterated-elimination-of-dominated-strategies/): Iteratively removing strategies that are strictly dominated. - [Rationalizability](https://relu.chat/learn/game-theory/rationalizability/): The set of strategies surviving iterated elimination of strategies that are never a best response. - [Common Knowledge](https://relu.chat/learn/game-theory/common-knowledge/): An event is common knowledge if everyone knows it, everyone knows that everyone knows it, and so on ad infinitum. - [Potential Games](https://relu.chat/learn/game-theory/potential-games/): Games where all unilateral payoff changes are captured by a single real-valued function. - [Congestion Games](https://relu.chat/learn/game-theory/congestion-games/): Games where each player's payoff depends on the load each facility carries. - [Price of Anarchy](https://relu.chat/learn/game-theory/price-of-anarchy/): The worst-case ratio between the social cost of a Nash equilibrium and the social optimum. - [Zermelo's Theorem](https://relu.chat/learn/game-theory/zermelos-theorem/): In finite two-player zero-sum games of perfect information without chance and draws allowed, either one player has a winning strategy or both can force a draw. - [Harsanyi Transformation](https://relu.chat/learn/game-theory/harsanyi-transformation/): Transforms games of incomplete information into games of imperfect information via a type space. - [Pareto Efficiency](https://relu.chat/learn/game-theory/pareto-efficiency/): An allocation is Pareto efficient if no player can be made strictly better off without making someone else worse off. - [Sequential Equilibrium](https://relu.chat/learn/game-theory/sequential-equilibrium/): A refinement of PBE requiring beliefs to be limits of fully mixed strategy perturbations. - [Proper Equilibrium](https://relu.chat/learn/game-theory/proper-equilibrium/): A refinement of trembling-hand perfection where more costly mistakes are infinitely less likely. - [Quantal Response Equilibrium](https://relu.chat/learn/game-theory/quantal-response-equilibrium/): An equilibrium where players best-respond noisily with choice probabilities increasing in expected payoff. - [Level-k Reasoning](https://relu.chat/learn/game-theory/level-k-reasoning/): A bounded-rationality model where players best-respond to lower-level opponents in a hierarchy of strategic depth. - [Global Games](https://relu.chat/learn/game-theory/global-games/): Games of incomplete information where players observe noisy signals of an underlying state, often producing unique equilibrium. - [Supermodular Games](https://relu.chat/learn/game-theory/supermodular-games/): A game in which a player's incentive to raise their action increases with opponents' actions (strategic complements). - [Wardrop Equilibrium](https://relu.chat/learn/game-theory/wardrop-equilibrium/): A flow assignment in which every used path has equal cost and no unused path has lower cost. - [Price of Stability](https://relu.chat/learn/game-theory/price-of-stability/): The best-case ratio between the social cost of a Nash equilibrium and the social optimum. - [Smoothed Analysis of Price of Anarchy](https://relu.chat/learn/game-theory/smoothed-analysis-of-price-of-anarchy/): A framework showing that worst-case PoA bounds can be overly pessimistic — typical-case bounds are often dramatically better. - [No-Regret Learning](https://relu.chat/learn/game-theory/no-regret-learning/): Learning dynamics where a player's cumulative payoff is no worse than the best fixed action in hindsight, up to a vanishing average error. - [Fictitious Play](https://relu.chat/learn/game-theory/fictitious-play/): A learning process in which players best-respond to the empirical distribution of past opponent play. - [Evolutionarily Stable Sets](https://relu.chat/learn/game-theory/evolutionarily-stable-sets/): A set of strategies such that every strategy in the set resists invasion by any outside mutant. - [Cheap Talk](https://relu.chat/learn/game-theory/cheap-talk/): Costless, non-binding, and verifiable communication prior to play that can influence equilibrium selection. - [Berge Equilibrium](https://relu.chat/learn/game-theory/berge-equilibrium/): An equilibrium where each player maximizes the payoff of all others, assuming they do not deviate from their Berge strategies. - [Mean Field Game](https://relu.chat/learn/game-theory/mean-field-game/): A game with a continuum of players where each player's influence on aggregate is negligible, simplifying equilibrium to a PDE system. - [Algorithmic Mechanism Design](https://relu.chat/learn/game-theory/algorithmic-mechanism-design/): The interface of mechanism design and computer science, concerned with computational tractability of incentive-compatible outcomes. - [Fair Division](https://relu.chat/learn/game-theory/fair-division/): The study of how to divide resources among agents so that each receives a fair share according to some criterion. - [Voting Theory](https://relu.chat/learn/game-theory/voting-theory/): The study of procedures for aggregating individual preferences into a collective decision. - [Social Choice Theory](https://relu.chat/learn/game-theory/social-choice-theory/): The theoretical study of how individual preferences and judgments can be aggregated into collective decisions. - [Banzhaf Power Index](https://relu.chat/learn/game-theory/banzhaf-power-index/): A measure of a voter's ability to influence the outcome of a vote, calculated as the number of coalitions in which they are pivotal. - [Core Selection (Matching)](https://relu.chat/learn/game-theory/core-selection-matching/): The selection of an allocation from the core of a matching market, typically via deferred-acceptance algorithms. - [Best-response table](https://relu.chat/learn/game-theory/best-response-table/): A best-response table marks the actions that maximize each player’s payoff against each fixed action of the opponent. Mutual best responses are pure Nash equilibria. - [Mixed-equilibrium calculation](https://relu.chat/learn/game-theory/mixed-equilibrium-calculation/): To find an interior mixed equilibrium, choose each player’s mixing probability to make the other player indifferent between actions in their support. - [Limits of equilibrium predictions](https://relu.chat/learn/game-theory/limits-of-equilibrium-predictions/): An equilibrium is a consistency condition on strategies and beliefs under a specified model. It does not guarantee that people will discover or play it. ### Islamic Golden Age - [House of Wisdom](https://relu.chat/learn/golden-age/house-of-wisdom/): Major intellectual center in Abbasid Baghdad that housed a vast library and translation institute. - [Al-Khwarizmi](https://relu.chat/learn/golden-age/al-khwarizmi/): Persian mathematician, astronomer, and geographer whose influential works systematized algebra and described arithmetic methods. - [Algebra](https://relu.chat/learn/golden-age/algebra/): Mathematical discipline founded by Al-Khwarizmi for solving equations through systematic transformation. - [Al-Kindi](https://relu.chat/learn/golden-age/al-kindi/): First major Islamic philosopher who synthesized Greek philosophy with Islamic thought. - [Ibn Sina (Avicenna)](https://relu.chat/learn/golden-age/ibn-sina-avicenna/): Persian polymath whose "Canon of Medicine" was the standard medical text in Europe and the Islamic world for 600 years. - [Canon of Medicine](https://relu.chat/learn/golden-age/canon-of-medicine/): Ibn Sina's medical encyclopedia that systematized all known medical knowledge and remained authoritative for six centuries. - [Ibn al-Haytham (Alhazen)](https://relu.chat/learn/golden-age/ibn-al-haytham-alhazen/): Arab scientist who founded optics as an experimental science and pioneered the scientific method. - [Optics in the Golden Age](https://relu.chat/learn/golden-age/optics-in-the-golden-age/): The science of light and vision as developed by Golden Age scholars, founded by Ibn al-Haytham. - [Translation Movement](https://relu.chat/learn/golden-age/translation-movement/): Massive project to translate Greek, Persian, Indian, and Syriac scientific works into Arabic. - [Al-Razi (Rhazes)](https://relu.chat/learn/golden-age/al-razi-rhazes/): Persian physician and alchemist who distinguished smallpox from measles and pioneered clinical observation. - [Astrolabe](https://relu.chat/learn/golden-age/astrolabe/): Sophisticated astronomical instrument for solving problems relating to time, position, and celestial motion. - [Astronomy in the Golden Age](https://relu.chat/learn/golden-age/astronomy-in-the-golden-age/): Highly advanced astronomical science developed in the Islamic world, combining Greek, Persian, and Indian traditions. - [Development of Algebra](https://relu.chat/learn/golden-age/development-of-algebra/): The evolution of algebra from Al-Khwarizmi's rhetorical algebra to symbolic notation. - [Maragha School](https://relu.chat/learn/golden-age/maragha-school/): School of astronomers at the Maragha Observatory who developed alternatives to Ptolemaic astronomy. - [Paper Making](https://relu.chat/learn/golden-age/paper-making/): Introduction and spread of papermaking technology from China through the Islamic world to Europe. - [Ibn Rushd (Averroes)](https://relu.chat/learn/golden-age/ibn-rushd-averroes/): Andalusian philosopher and jurist whose commentaries on Aristotle shaped medieval European thought. - [Al-Ghazali](https://relu.chat/learn/golden-age/al-ghazali/): Influential Islamic theologian, jurist, and mystic who critiqued excessive rationalism in philosophy. - [Medicine in the Golden Age](https://relu.chat/learn/golden-age/medicine-in-the-golden-age/): Medical science as practiced and advanced in the Islamic world, combining Greek theory with clinical observation. - [Al-Biruni](https://relu.chat/learn/golden-age/al-biruni/): Persian scholar who made groundbreaking contributions to astronomy, geography, and comparative religion. - [Al-Zahrawi (Abulcasis)](https://relu.chat/learn/golden-age/al-zahrawi-abulcasis/): Andalusian surgeon whose medical encyclopedia was the standard surgical text in Europe for 500 years. - [Ibn al-Nafis](https://relu.chat/learn/golden-age/ibn-al-nafis/): Arab physician who discovered pulmonary circulation 300 years before William Harvey. - [Philosophy in the Golden Age](https://relu.chat/learn/golden-age/philosophy-in-the-golden-age/): The philosophical tradition that synthesized Greek philosophy with Islamic theology. - [Al-Farabi](https://relu.chat/learn/golden-age/al-farabi/): Central Asian philosopher and political theorist who systematized Islamic philosophy and wrote on the ideal state. - [Omar Khayyam](https://relu.chat/learn/golden-age/omar-khayyam/): Persian polymath who solved cubic equations geometrically and is also renowned for his poetry. - [Al-Zarqali](https://relu.chat/learn/golden-age/al-zarqali/): Andalusian astronomer and instrument maker who invented the universal astrolabe and improved astronomical tables. - [Nasir al-Din al-Tusi](https://relu.chat/learn/golden-age/nasir-al-din-al-tusi/): Persian polymath who founded the Maragha Observatory and developed the Tusi couple, influencing Copernican astronomy. - [Ibn al-Shatir](https://relu.chat/learn/golden-age/ibn-al-shatir/): Damascene astronomer whose lunar and planetary models were mathematically identical to Copernicus' later formulations. - [Ulugh Beg](https://relu.chat/learn/golden-age/ulugh-beg/): Timurid sultan, mathematician, and astronomer who built the world's largest observatory and compiled a stellar catalog of unprecedented accuracy. - [Al-Battani](https://relu.chat/learn/golden-age/al-battani/): Arab astronomer and mathematician who made remarkably accurate astronomical observations and improved Ptolemy's star catalog. - [Hunayn ibn Ishaq](https://relu.chat/learn/golden-age/hunayn-ibn-ishaq/): Nestorian Christian translator, physician, and scholar who led the translation of Greek medical texts into Arabic. - [Al-Idrisi](https://relu.chat/learn/golden-age/al-idrisi/): Arab geographer and cartographer who created the most accurate world map and geographical encyclopedia of the pre-modern era. - [Ibn Khaldun](https://relu.chat/learn/golden-age/ibn-khaldun/): Arab historian, philosopher, and social scientist whose Muqaddimah laid foundations for modern historiography and sociology. - [Al-Jazari](https://relu.chat/learn/golden-age/al-jazari/): Greatest mechanical engineer of the medieval Islamic world, known for his automata and programmable machines. - [Banu Musa Brothers](https://relu.chat/learn/golden-age/banu-musa-brothers/): Three Persian brothers who produced the "Book of Ingenious Devices," a major work on mechanical engineering and automata. - [Thabit ibn Qurra](https://relu.chat/learn/golden-age/thabit-ibn-qurra/): Sabian mathematician, physician, and translator who made fundamental contributions to number theory and geometry. - [Al-Karaji](https://relu.chat/learn/golden-age/al-karaji/): Persian mathematician who freed algebra from geometry by arithmetizing algebraic operations. - [Al-Samawal](https://relu.chat/learn/golden-age/al-samawal/): Arab mathematician who developed techniques for polynomial arithmetic and division. - [Ibn Sahl](https://relu.chat/learn/golden-age/ibn-sahl/): Persian mathematician and optician who discovered the law of refraction (Snell's law) 600 years before Snell. - [Al-Farghani](https://relu.chat/learn/golden-age/al-farghani/): Central Asian astronomer whose summary of Ptolemaic astronomy became a standard textbook in Europe and the Islamic world. - [Qusta ibn Luqa](https://relu.chat/learn/golden-age/qusta-ibn-luqa/): Melkite Christian translator, physician, and philosopher who bridged Greek and Arabic medicine and science. - [Al-Majriti](https://relu.chat/learn/golden-age/al-majriti/): Andalusian mathematician, astronomer, and alchemist who established science in Islamic Spain. - [Fatima al-Fihri](https://relu.chat/learn/golden-age/fatima-al-fihri/): Arab woman who founded the University of al-Qarawiyyin, the oldest existing degree-granting university in the world. - [Mariam al-Astrulabi](https://relu.chat/learn/golden-age/mariam-al-astrulabi/): 10th-century Syrian female astronomer and astrolabe maker, one of the few known women scientists of the Golden Age. - [Lubana of Cordoba](https://relu.chat/learn/golden-age/lubana-of-cordoba/): Andalusian female mathematician and librarian who served at the Library of Cordoba. - [Abbas ibn Firnas](https://relu.chat/learn/golden-age/abbas-ibn-firnas/): Andalusian polymath who made the first recorded attempt at controlled human flight and invented various devices. - [Ibn Bajjah (Avempace)](https://relu.chat/learn/golden-age/ibn-bajjah-avempace/): Andalusian philosopher, astronomer, and physician who developed a naturalistic philosophy and anticipated Galilean motion. - [Ibn Tufayl](https://relu.chat/learn/golden-age/ibn-tufayl/): Andalusian philosopher and physician whose novel "Hayy ibn Yaqzan" explored the nature of reason and revelation. - [Reading historical sources](https://relu.chat/learn/golden-age/reading-historical-sources/): Historical claims should distinguish surviving primary texts, later copies, translations, and modern interpretation. An attribution can be plausible without being certain. - [Networks of knowledge transmission](https://relu.chat/learn/golden-age/networks-of-knowledge-transmission/): Scholarship across medieval Islamic societies developed through networks of translation, teaching, travel, correspondence, and manuscript copying. - [Periodization of the Islamic Golden Age](https://relu.chat/learn/golden-age/periodization-of-the-islamic-golden-age/): The Islamic Golden Age is a broad modern label for periods of intellectual activity across diverse societies. Exact starting and ending dates depend on the field and region. ### Data science - [Python for Data Work](https://relu.chat/learn/data-science/python-for-data-work/): Python's data ecosystem centers on pandas for tabular data and NumPy for numerical computing. - [Pandas DataFrame](https://relu.chat/learn/data-science/pandas-dataframe/): A pandas DataFrame is a two-dimensional labeled data structure resembling a table with named columns and a row index. - [NumPy Arrays](https://relu.chat/learn/data-science/numpy-arrays/): NumPy's ndarray is a homogeneous n-dimensional array enabling efficient vectorized computation. - [Data Cleaning](https://relu.chat/learn/data-science/data-cleaning/): Data cleaning is the process of fixing errors, inconsistencies, and structural issues in raw data before analysis. - [Missing Values](https://relu.chat/learn/data-science/missing-values/): Missing values (NaN in pandas, null in SQL) represent unknown or uncollected data that must be handled before modeling. - [Data Visualization](https://relu.chat/learn/data-science/data-visualization/): Visualization translates data into graphics to reveal patterns, trends, and anomalies that numbers alone obscure. - [Descriptive Statistics](https://relu.chat/learn/data-science/descriptive-statistics/): Descriptive statistics summarize the central tendency, spread, and shape of a dataset. - [Probability Basics](https://relu.chat/learn/data-science/probability-basics/): Probability quantifies uncertainty, measuring how likely an event is on a scale from 0 (impossible) to 1 (certain). - [Probability Distributions](https://relu.chat/learn/data-science/probability-distributions/): A probability distribution assigns probabilities to outcomes of a random variable; key distributions model common data-generating processes. - [Train/Test Split](https://relu.chat/learn/data-science/train-test-split/): Splitting data into training and test sets evaluates how a model generalizes to unseen data. - [Classification](https://relu.chat/learn/data-science/classification/): Classification predicts a discrete class label (spam/not spam, iris species) from input features. - [Logistic Regression](https://relu.chat/learn/data-science/logistic-regression/): Logistic regression models the probability of a binary outcome as a logistic (sigmoid) function of a linear combination of features. - [Decision Trees](https://relu.chat/learn/data-science/decision-trees/): A decision tree splits data recursively on feature values, creating a flowchart-like model that's easy to interpret. - [Regression](https://relu.chat/learn/data-science/regression/): Regression predicts a continuous numerical outcome (house price, GDP growth) from input features. - [Linear Regression](https://relu.chat/learn/data-science/linear-regression/): Linear regression predicts a continuous target as a weighted sum of features, fit by ordinary least squares (OLS). - [Clustering](https://relu.chat/learn/data-science/clustering/): Clustering groups similar data points without predefined labels — an unsupervised technique for discovering structure. - [K-Means Clustering](https://relu.chat/learn/data-science/k-means-clustering/): K-means partitions n points into k clusters, each represented by its centroid, minimizing within-cluster variance. - [Feature Engineering](https://relu.chat/learn/data-science/feature-engineering/): Feature engineering transforms raw data into model-friendly inputs, often determining model success more than algorithm choice. - [Model Evaluation](https://relu.chat/learn/data-science/model-evaluation/): Model evaluation quantifies how well a model performs, using metrics tailored to the problem type and business goal. - [Accuracy](https://relu.chat/learn/data-science/accuracy/): Accuracy is the proportion of correct predictions (both true positives and true negatives) out of all predictions. - [Precision and Recall](https://relu.chat/learn/data-science/precision-and-recall/): Precision measures how trustworthy positive predictions are; recall measures how many actual positives the model captures. - [F1 Score](https://relu.chat/learn/data-science/f1-score/): The F1 score is the harmonic mean of precision and recall, balancing both in a single metric. - [ROC and AUC](https://relu.chat/learn/data-science/roc-and-auc/): The ROC curve plots true positive rate (recall) against false positive rate at every classification threshold; AUC summarizes it. - [Overfitting](https://relu.chat/learn/data-science/overfitting/): Overfitting occurs when a model learns the training data too well — including its noise — and generalizes poorly. - [Underfitting](https://relu.chat/learn/data-science/underfitting/): Underfitting occurs when a model is too simple to capture the underlying pattern, performing poorly on both training and test data. - [Cross-Validation](https://relu.chat/learn/data-science/cross-validation/): Cross-validation evaluates a learning procedure on held-out data. In k-fold CV, each fold takes a turn as the validation set while the model trains on the remaining folds. - [Data Leakage](https://relu.chat/learn/data-science/data-leakage/): Data leakage occurs when information from the test set sneaks into the training process, making evaluation overly optimistic. - [Bias-Variance Tradeoff](https://relu.chat/learn/data-science/bias-variance-tradeoff/): Bias-variance decomposition separates a model's error into bias (systematic error from wrong assumptions) and variance (sensitivity to training data). - [Regularization](https://relu.chat/learn/data-science/regularization/): Regularization adds a penalty to the loss function to discourage overly complex models, reducing overfitting. - [Ensemble Methods](https://relu.chat/learn/data-science/ensemble-methods/): Ensemble methods combine multiple models into one prediction, typically reducing variance (bagging) or bias (boosting). - [Principal Component Analysis](https://relu.chat/learn/data-science/principal-component-analysis/): PCA finds orthogonal directions of maximum variance in data, projecting onto a lower-dimensional subspace. - [Time Series Analysis](https://relu.chat/learn/data-science/time-series-analysis/): Time series analysis handles data ordered chronologically, where temporal dependencies matter. - [Model Deployment](https://relu.chat/learn/data-science/model-deployment/): Deploying a model means making it available to make predictions on new data in a production environment. - [Browser and Local ML](https://relu.chat/learn/data-science/browser-and-local-ml/): Running ML models directly in the browser or on the local machine without a server enables privacy-preserving, low-latency inference. - [Exploratory Data Analysis](https://relu.chat/learn/data-science/exploratory-data-analysis/): EDA is the initial investigation of a dataset to understand its structure, spot anomalies, and generate hypotheses. - [Outlier Detection](https://relu.chat/learn/data-science/outlier-detection/): Outliers are data points that deviate significantly from the overall pattern; they may indicate errors, rare events, or genuine extreme behavior. - [Feature Scaling](https://relu.chat/learn/data-science/feature-scaling/): Feature scaling standardizes the range or distribution of features so that no single feature dominates distance calculations. - [Dimensionality Reduction](https://relu.chat/learn/data-science/dimensionality-reduction/): Dimensionality reduction transforms high-dimensional data into a lower-dimensional representation while preserving key structure. - [Grouped cross-validation](https://relu.chat/learn/data-science/grouped-cross-validation/): Grouped cross-validation keeps observations from the same entity together in one fold. It tests transfer to unseen entities rather than recognition of familiar ones. - [Probability calibration](https://relu.chat/learn/data-science/probability-calibration/): Calibration asks whether predicted probabilities agree with observed frequencies. A model can rank cases well while assigning misleading probability values. - [Dataset shift](https://relu.chat/learn/data-science/dataset-shift/): Dataset shift occurs when the distribution encountered during use differs from the training distribution. It can affect inputs, labels, or their relationship. ### Reinforcement learning - [Reinforcement learning](https://relu.chat/learn/reinforcement-learning/reinforcement-learning/): Reinforcement learning studies agents that improve decisions through interaction and reward. The objective is expected return over time, not simply predicting a labeled answer. - [Markov decision process](https://relu.chat/learn/reinforcement-learning/markov-decision-process/): An MDP describes states, actions, transition probabilities, rewards, and a discount factor. A state is Markov when it contains the information needed to predict the next transition given the action. - [Reward and return](https://relu.chat/learn/reinforcement-learning/reward-and-return/): Reward is feedback for one transition; return aggregates rewards across future steps. They are different learning targets. - [Exploration and exploitation](https://relu.chat/learn/reinforcement-learning/exploration-and-exploitation/): Exploration tries actions to learn about their outcomes; exploitation chooses actions that currently appear best. - [Contextual bandit](https://relu.chat/learn/reinforcement-learning/contextual-bandit/): A contextual bandit chooses an action using the current context and receives one-step reward. It does not model how the action changes future states. - [Value function](https://relu.chat/learn/reinforcement-learning/value-function/): A state-value function estimates expected return from a state when following a particular policy. It depends on both the environment and the policy. - [Bellman equation](https://relu.chat/learn/reinforcement-learning/bellman-equation/): A Bellman equation relates value now to expected immediate reward plus discounted value after the next transition. - [Q-learning](https://relu.chat/learn/reinforcement-learning/q-learning/): Q-learning is an off-policy temporal-difference method that updates an action-value estimate toward a reward plus the best estimated next-state value. - [SARSA](https://relu.chat/learn/reinforcement-learning/sarsa/): SARSA updates an action-value estimate using the next action actually chosen by the behavior policy. It is an on-policy TD control method. - [Policy gradient](https://relu.chat/learn/reinforcement-learning/policy-gradient/): Policy-gradient methods adjust a parameterized action distribution to increase expected return. REINFORCE uses sampled returns to weight log-probability gradients. - [Actor-critic](https://relu.chat/learn/reinforcement-learning/actor-critic/): Actor-critic methods combine a policy, the actor, with a learned value estimator, the critic. The critic supplies a lower-variance learning signal. - [Experience replay](https://relu.chat/learn/reinforcement-learning/experience-replay/): Experience replay stores transitions and samples them later for learning. It can reduce sample correlation and reuse expensive experience. - [Reward shaping](https://relu.chat/learn/reinforcement-learning/reward-shaping/): Reward shaping adds learning guidance. Poorly designed rewards can teach an agent to optimize a proxy while failing the intended task. - [RL evaluation](https://relu.chat/learn/reinforcement-learning/rl-evaluation/): RL evaluation measures a fixed policy on tasks, seeds, or environments that were not used to choose its parameters. Training reward alone is insufficient. - [Efficient RL on a laptop](https://relu.chat/learn/reinforcement-learning/efficient-rl-on-a-laptop/): Efficient laptop training starts with a small decision problem, compact features, vectorized batches, and a fixed wall-clock budget. - [Termination and truncation](https://relu.chat/learn/reinforcement-learning/termination-and-truncation/): Termination means the task reached an end state. Truncation means an external limit stopped observation, even if the underlying task could continue. ### Linear algebra - [Vector](https://relu.chat/learn/linear-algebra/vector/): A vector is an element of a vector space. In coordinates it can be represented by an ordered list of numbers with rules for addition and scalar multiplication. - [Dot product](https://relu.chat/learn/linear-algebra/dot-product/): The Euclidean dot product multiplies corresponding coordinates and sums the products. It measures directional alignment together with magnitude. - [Vector norm](https://relu.chat/learn/linear-algebra/vector-norm/): A norm assigns a nonnegative size to a vector and satisfies definiteness, homogeneity, and the triangle inequality. - [Matrix multiplication](https://relu.chat/learn/linear-algebra/matrix-multiplication/): Matrix multiplication composes linear maps. Each result entry is a row-column dot product, and the inner dimensions must match. - [Linear independence](https://relu.chat/learn/linear-algebra/linear-independence/): Vectors are linearly independent when no nontrivial linear combination of them equals zero. - [Basis and span](https://relu.chat/learn/linear-algebra/basis-and-span/): The span of vectors contains all their linear combinations. A basis is an independent set that spans a vector space. - [Matrix rank](https://relu.chat/learn/linear-algebra/matrix-rank/): The rank of a matrix is the dimension of its column space, equal to the dimension of its row space. - [Null space](https://relu.chat/learn/linear-algebra/null-space/): The null space of A is the set of vectors mapped to zero by A. It is a subspace of the input space. - [Linear system](https://relu.chat/learn/linear-algebra/linear-system/): A linear system asks for x satisfying Ax = b. It can have no solution, one solution, or infinitely many. - [Matrix inverse](https://relu.chat/learn/linear-algebra/matrix-inverse/): An inverse reverses a square linear transformation. A square matrix is invertible exactly when it has full rank. - [Determinant](https://relu.chat/learn/linear-algebra/determinant/): The determinant of a square matrix is the signed volume scaling factor of its linear transformation. A zero determinant indicates singularity. - [Eigenvalues and eigenvectors](https://relu.chat/learn/linear-algebra/eigenvalues-and-eigenvectors/): An eigenvector is a nonzero vector whose direction is preserved by a square linear map. Its eigenvalue is the corresponding scaling factor. - [Orthogonal projection](https://relu.chat/learn/linear-algebra/orthogonal-projection/): Orthogonal projection finds the closest vector in a subspace under the Euclidean norm. The residual is perpendicular to that subspace. - [Least squares](https://relu.chat/learn/linear-algebra/least-squares/): Least squares chooses parameters that minimize the sum of squared residuals when exact agreement may be impossible. - [Singular value decomposition](https://relu.chat/learn/linear-algebra/singular-value-decomposition/): SVD factors a real matrix into orthogonal directions, nonnegative scale factors, and another orthogonal change of coordinates. It applies to rectangular matrices too. - [Condition number](https://relu.chat/learn/linear-algebra/condition-number/): A condition number measures how sensitive a problem solution is to input perturbations. It describes the problem, distinct from algorithmic stability. ### Web platform - [WebAssembly](https://relu.chat/learn/web-platform/webassembly/): WebAssembly is a portable binary instruction format that runs inside a host such as a browser. JavaScript loads modules and provides host capabilities. - [Linear memory](https://relu.chat/learn/web-platform/linear-memory/): WebAssembly linear memory is a byte-addressed buffer accessed from JavaScript through typed-array views. Its bounds are checked by the runtime. - [Web Worker](https://relu.chat/learn/web-platform/web-worker/): A Web Worker runs JavaScript in a separate execution context, helping keep long computations away from the main UI thread. - [Transferable objects](https://relu.chat/learn/web-platform/transferable-objects/): Transferable objects allow ownership of a resource such as an ArrayBuffer to move between contexts without copying the buffer contents. - [Service worker](https://relu.chat/learn/web-platform/service-worker/): A service worker is an event-driven script that can intercept requests within its scope and support offline behavior. It is separate from a page worker. - [Cache strategies](https://relu.chat/learn/web-platform/cache-strategies/): A cache strategy chooses when to read stored responses and when to request fresh content. Different assets need different freshness rules. - [HTTP caching](https://relu.chat/learn/web-platform/http-caching/): HTTP caching uses response headers and validators to control reuse by browsers and intermediaries. It is separate from service-worker Cache Storage. - [IndexedDB](https://relu.chat/learn/web-platform/indexeddb/): IndexedDB is an asynchronous transactional database for structured browser data. It supports keys, indexes, and large records. - [Promises and async functions](https://relu.chat/learn/web-platform/promises-and-async-functions/): A Promise represents eventual completion or failure. An async function returns a Promise, and await pauses that function until a value settles. - [Event loop](https://relu.chat/learn/web-platform/event-loop/): The browser event loop coordinates tasks, microtasks, and rendering opportunities. Long-running JavaScript can delay user input and painting. - [AbortController](https://relu.chat/learn/web-platform/abortcontroller/): AbortController signals cancellation to operations that support AbortSignal, including fetch. Cancellation is cooperative. - [Content Security Policy](https://relu.chat/learn/web-platform/content-security-policy/): Content Security Policy restricts which sources and execution forms a page may use. It can reduce the impact of script injection. - [Cross-origin isolation](https://relu.chat/learn/web-platform/cross-origin-isolation/): Cross-origin isolation is a browser state enabled by compatible opener and embedder policies. It allows capabilities such as shared memory in supported contexts. - [Accessible form](https://relu.chat/learn/web-platform/accessible-form/): An accessible form gives controls meaningful labels, supports keyboard use, and exposes feedback without relying only on color. - [Responsive layout](https://relu.chat/learn/web-platform/responsive-layout/): Responsive layout adapts to available space, input methods, and user settings. It includes content behavior as well as breakpoints. - [Performance measurement](https://relu.chat/learn/web-platform/performance-measurement/): Performance measurement separates startup, steady-state work, and user-visible response time. One fast average can hide expensive first visits.