The Idea
With dozens of AI techniques available, the hardest question isn't "how to solve this" — it's "which approach should I use?" A math problem needs code execution, not brainstorming. A research question needs retrieval, not chain-of-thought. Using the wrong technique wastes time and produces poor results.
The Adaptive Pattern Router solves this by classifying every incoming task along four dimensions and automatically routing it to the best technique. If the first attempt doesn't work, it escalates — trying more sophisticated patterns. Over time, it tracks which routes succeed, getting progressively smarter at picking the right approach.
Component Patterns
This system coordinates compositions from Level 2:
Meta-Prompting Chain It ReflexionThe router uses meta-prompting to select the best "expert" pattern, chains patterns together when tasks need combined capabilities, and uses reflexion to learn from routing failures.
Four Dimensions of Classification
Every task is analyzed across four dimensions before routing:
Task Type
Math, coding, research, creative, reasoning, QA, summarization, translation, conversation — each type has patterns that work best.
Complexity
Simple (one step), moderate (few steps), complex (many steps), or exploratory (unknown path). Higher complexity triggers more powerful patterns.
Tool Requirements
None, search, code execution, file access, API calls, database, multi-tool. Tool needs determine whether to use ReAct, ReWOO, or pure reasoning.
Verification Need
None, self-check, external validation, or consensus. High-stakes tasks get more rigorous verification patterns.
The Routing Table
Classification maps to patterns. Here's a simplified version of how tasks get routed:
| Task Signal | Routed To | Why |
|---|---|---|
| Math + code execution | Program of Thoughts | Let the interpreter handle precision |
| Research + complex | Plan-and-Execute + RAG | Plan the research, retrieve real sources |
| Reasoning + verification | Chain-of-Thought + Check | Think it through, then verify |
| Exploration + uncertain | Tree-of-Thoughts | Explore multiple paths when the answer isn't clear |
| Tool use + dynamic | ReAct | Think-act-observe loop for tool interaction |
| Tool use + predictable | ReWOO / LLMCompiler | Plan all tool calls upfront, batch execute |
See It in Action
Input: "What is the integral of sin(x) × e^x?"
When It Fails: Escalation
If Program of Thoughts had returned an error, the router would automatically escalate: increase complexity to "complex," add self-consistency verification, and retry with Tree-of-Thoughts reasoning about integration techniques. Each failure teaches the router to try more powerful patterns next time for similar tasks.
Why This Works
No single technique is best at everything. Chain-of-thought excels at reasoning but can't run code. ReAct handles tools but is overkill for simple questions. The router's power is in matching: it ensures each task gets the technique that handles it best.
The learning loop is what makes this a system rather than just a decision tree. By tracking which patterns succeed for which task types, the router improves over time — discovering patterns like "math questions with code_execution always work better with Program of Thoughts than Chain-of-Thought."
The System
Classify the task. Route to the best pattern. Validate the result. If it fails, escalate and try again. Track what works. A meta-controller that gets smarter over time.
When to Use This
- • Production systems handling diverse task types that need reliable results across all of them
- • General-purpose assistants where users ask everything from math to creative writing
- • Platforms that want to improve routing quality over time through learning
- • Any system that already uses multiple patterns and needs a way to choose between them
When to Skip This
- • Single-purpose applications — if all tasks are the same type, just use the right pattern directly
- • All tasks are similar — routing overhead adds no value when the answer is always the same
- • Latency-critical systems — classification adds an LLM call before work begins
- • Simple tasks dominate — the overhead isn't justified when chain-of-thought handles 90% of requests
How It Relates
The Adaptive Pattern Router is the complement to the Cognitive Loop. Where the Cognitive Loop is the default processing pipeline, the router decides whether to invoke the full loop or use a simpler approach. For hard reasoning, it can route to LATS. For multi-model tasks, it routes to JARVIS. For collaborative tasks, Multi-Agent Compositions.
At Level 4, the Meta-Learning Agent System uses the router's performance data to optimize the entire pattern selection process, and the Cognitive Operating System uses it as the front-door dispatcher for all incoming requests.