🧠 AI Thinking Machine Lab — ToT, Reflexion, HyDE, RRF, Generative Memory (Research Stack 2022-2026)

Byte 3.0's thinking machine live — implements 2022-2026 research: Tree-of-Thought BFS/DFS (Yao 2023), Self-Consistency voting (Wang 2022), Reflexion verbal RL (Shinn 2023), Step-Back abstraction (Zheng 2023), Least-to-Most decomposition (Zhou 2022), ReAct (Yao 2022), HyDE hypothetical docs (Gao 2022), RRF fusion (Cormack 2009), MMR diversity (Carbonell 1998), Generative Agents memory (Park 2023), Constitutional AI (Bai 2022). All local, no API.

Retrieval v3 — toggles
Memory — GenAgents
Recency Ebbinghaus exp(-h/48)
Importance 1-10 heuristic
Relevance cosine
Final = rec*0.2+imp*0.3+rel*0.5
Ready — will show full research stack trace
Tree-of-Thought visualization (Yao et al. 2023) — BFS with evaluation
Grounding
Constitutional
Best score
Research: CoT Wei 2022, Self-Consistency Wang 2022, ToT Yao 2023, ReAct Yao 2022, Reflexion Shinn 2023, Step-Back Zheng 2023, Least-to-Most Zhou 2022, Constitutional Bai 2022, HyDE Gao 2022, RRF Cormack 2009, MMR Carbonell 1998, GenAgents Park 2023
How Byte 3.0 thinking machine works — research stack
Retrieval v3: Query → tokenize → query expansion (synonyms + heuristic: mortgage→loan,interest) → HyDE hypothetical doc (Gao 2022) embedding → BM25 score (k1=1.2,b=0.75) + embedding cosine + HyDE cosine → RRF fusion (Cormack 2009) 1/(k+rank) ensemble of BM25 and embedding ranks → cross-encoder re-rank simulation (token overlap + embedding joint) → MMR diversity (Carbonell 1998) λ=0.7 balancing relevance vs redundancy → final top 8 with scores breakdown.
Reasoning: Auto-routes by complexity: simple→CoT, complex→ToT, plan→Least-to-Most, abstract→Step-Back. ToT BFS: root goal → branch 3 thoughts → evaluate 0-10 heuristic → promising/pruned → expand promising to L2 → select best path. Self-Consistency: sample 3 paths with different angles, confidence scores, vote. Reflexion: attempt → critique (what missed?) → retry improved. Step-Back: abstract principle first, then apply. Least-to-Most: decompose into subproblems solving sequentially. ReAct: Thought→Action (tool call)→Observation loop. Constitutional AI: self-critique vs principles grounded/helpful/honest/harmless/privacy.
Memory (Generative Agents Park 2023): Importance scoring heuristic 1-10 (financial/personal/preferences high, greetings low), recency Ebbinghaus exp(-hours/48) half-life 48h, relevance cosine. Final retrieval score = recency*0.2 + importance*0.3 + relevance*0.5. Hierarchical: working (current context) → short-term (last 100 turns) → long-term (IndexedDB vector) → episodic (interaction history). Reflection: summarize recent memories into higher-level insights.
Why this is best possible from GitHub repo: All research implemented in pure browser JS, zero dependencies, zero API, static hosting. 3MB brain (7517 vocab, 1124 tools, 64-dim embeddings, tool graph) + runtime advanced retrieval + reasoning simulation. Model optional (WebGPU) but demo mode already shows full trace. Privacy by construction — no data leaves browser.