Skip to content

Architectures

Every architecture implements the Architecture ABC. Click any row to open the full notebook with live LLM outputs, theory, mermaid diagram, and tailored commentary.

Reasoning & Reflection

Self-critique loops that drive answer quality up through iteration — and catch hallucinations before they ship.

Architecture Pattern Captured signature
Reflection Generate → critique → refine 4 iters, scores 9→9→9→8
Reflexion Verbal reflections in episodic memory trials [1,3,1]; memory transferred ✅
Chain-of-Verification Verify each baseline claim independently Qwen refused hallucination; Llama caught 3
Self-Discover SELECT → ADAPT → IMPLEMENT → SOLVE 5 modules / 4-step plan / correct answer
Constitutional AI Per-rule pass/fail → Python AND → revise ¼ passed after 2 iters

When a single chain of thought isn't enough — draw many, score them, or grow a real search tree.

Architecture Pattern Captured signature
Self-Consistency Sample N paths, majority-vote 7/7 unanimous; baseline 6/7
Tree of Thoughts Beam search over thoughts 16-thought tree, scores [5,4,4,4,...]
LATS MCTS-style tree with reward backup 9 nodes, value spread [10,5,5,5,3]
Mental Loop Simulate → score (deterministic-picker) LLM [4,4,4] → Python [5,4,4]
Ensemble N voters, majority/weighted aggregation YES=2, NO=1 keyword-fallback

Retrieval (RAG)

Ground every claim. Five distinct retrieval shapes, each suited to a different failure mode.

Architecture Pattern Captured signature
Agentic RAG Agent decides when & what to retrieve 4 tasks; arithmetic skipped retrieval ✅
Corrective RAG Grade docs, fall back to web Categorical relevance + Python routing
Self-RAG Per-doc reflection tokens direct ¼ kept; mismatch 0/4 (admits gap ✅)
Adaptive RAG Pre-route by query complexity 3/3 routing accuracy
GraphRAG KG + community summaries 5 communities sized [16,10,9,7,5]

Memory

Learn across .run() calls. Pick the storage shape that matches your transfer pattern.

Architecture Stored unit Captured signature
Episodic + Semantic Conversation turns + triples 11 triples / 6 facts recalled
Graph Memory (subject, predicate, object) triples 18 triples / 5/5 Q&A
MemGPT OS-style context + archival tiers 5 turns; eviction triggered
Voyager Reusable Python skills (real subprocess) 3 tasks; factorial reused ✅
Agent Workflow Memory High-level workflow recipes 3 tasks; library grew 0→1→2→3

Tools & Actions

Act on the real world. From a single search tool to a sandboxed code repo to a real Chromium browser.

Architecture Pattern Captured signature
Tool Use Agent with one tool 2 queries; Llama runaway capped
ReAct Thought → Action → Observation 3 thoughts / 2 actions
Planning Decompose → execute → replan 7 steps, 0 replans
Plan-Execute-Verify (PEV) Post-execution verification per step 2 pass + 1 fail-accepted
SWE-Agent Sandboxed file-system agent [read,write,write,read,run_check,answer]
BrowserAgent Real Playwright + safety gate All 4 evil-phishing.com attempts blocked ✅

Multi-Agent

Coordinate many minds — specialists, adversarial debate, multi-perspective research.

Architecture Pattern Captured signature
Multi-Agent Supervisor + specialists 3/3 specialists contributed
Blackboard Shared workspace + agents 5 rounds, ¾ contributed
Debate N agents × K rounds Group-think failure on Sally trick (instructive)
STORM Multi-perspective research → article 3 perspectives → 6 web-grounded answers
Meta-Controller Router over architectures 4/4 routes correct

Safety & Routing

Block before harm. Route to the right specialist. Make the deciding signal a deterministic Python check, never an LLM number.

Architecture Pattern Captured signature
Dry-Run Propose → simulate → approval gate 3 tasks: approve / reviewer / blocked
Reflexive Metacognitive Self-aware capability routing 4 tasks; 3 Python overrides fired
Computer Use Categorical actions + Python safety gate Real Chromium; safety gate fired ✅

Specialty

Patterns with a unique shape — keep these in mind for when the standard families don't fit.

Architecture Pattern Captured signature
RLHF Self-Improvement Multi-dim deterministic scoring + archive composite [8,8,10] vs LLM [8,9,8]
Cellular Automata LLM rules over a grid Forest fire spread captured

Cross-cutting