Conceptual Framework — This page describes a theoretical architecture synthesized from published research, not a single proven technique. The building blocks are real; the overall design is a blueprint for how they could fit together.

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 Reflexion

The 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:

Dimension 1

Task Type

Math, coding, research, creative, reasoning, QA, summarization, translation, conversation — each type has patterns that work best.

Dimension 2

Complexity

Simple (one step), moderate (few steps), complex (many steps), or exploratory (unknown path). Higher complexity triggers more powerful patterns.

Dimension 3

Tool Requirements

None, search, code execution, file access, API calls, database, multi-tool. Tool needs determine whether to use ReAct, ReWOO, or pure reasoning.

Dimension 4

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?"

1
Classify
Four dimensions
Type: math. Complexity: moderate. Tools: code execution. Verification: self-check.
2
Route
Pattern selected
Math + code execution → Program of Thoughts. Verification needed → add Check Your Work.
3
Execute
Program of Thoughts result
Code generates: integrate(sin(x) * exp(x), x) → Result: ex(sin(x) − cos(x)) / 2
4
Validate
Verification check
Derivative of result equals sin(x) × ex. CONFIRMED

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

When to Skip This

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.