The dispatcher that sits above every technique. Classify the task, pick the best approach, validate the result — and learn which patterns work best over time.
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.
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.
Every task is analyzed across four dimensions before routing:
Math, coding, research, creative, reasoning, QA, summarization, translation, conversation — each type has patterns that work best.
Simple (one step), moderate (few steps), complex (many steps), or exploratory (unknown path). Higher complexity triggers more powerful patterns.
None, search, code execution, file access, API calls, database, multi-tool. Tool needs determine whether to use ReAct, ReWOO, or pure reasoning.
None, self-check, external validation, or consensus. High-stakes tasks get more rigorous verification patterns.
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 |
Input: "What is the integral of sin(x) × e^x?"
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.
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."
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.
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.