AXe Skills HubSearch /

← All skills

llm-reasoning-patterns

AXe First-party 

Reference: full SKILL.md

Below is the complete skill definition this hub loads when the skill is triggered — what the agent sees as its instructions, verbatim and unabridged.

LLM Reasoning Patterns — How World-Class Models Think

The difference between a mediocre LLM response and an exceptional one is almost always

the quality of the reasoning process, not the quality of the final answer alone.

This skill gives Claude (and any LLM) the complete toolkit for structured, rigorous,

and calibrated reasoning across complex analytical, diagnostic, and strategic tasks.

The Hierarchy of LLM Reasoning

Level 0: Pattern matching      → "The answer is X" (no reasoning shown)
Level 1: Chain-of-Thought      → "First... then... therefore X"
Level 2: Hypothesis-driven     → "H1: X. H2: Y. Evidence supports H1 because..."
Level 3: ReAct (Reason+Act)    → Think → Act → Observe → Think → Act → ...
Level 4: Tree of Thoughts      → Explore multiple branches, prune, converge
Level 5: Meta-cognitive        → "My reasoning might be wrong because... let me check"

The best LLMs operate at Level 3–5 for hard problems. Level 0–1 is fine for factual

retrieval. Complex diagnosis, strategy, and data analysis require Level 3+.

Chain-of-Thought (CoT) — The Foundation

CoT simply means showing the reasoning steps before the answer.

This dramatically improves accuracy on multi-step problems.

Basic CoT structure:

[PROBLEM]: A brand's consideration score dropped 7 points this wave.

[STEP 1: Clarify what we're measuring]
Consideration score = weighted T2B on Q_CONSIDERATION. We're comparing Wave 2 to Wave 3.
Need to confirm: same question wording? Same methodology? Same sample composition?

[STEP 2: Rule out data artefacts before brand causes]
Check 1: Did sample composition shift? → Run demographic comparison W2 vs W3
Check 2: Were extreme weights applied differently? → Run weight distribution check
Check 3: Is the drop statistically significant? → Z-test: p1=0.48, n1=520, p2=0.41, n2=490
  z = (0.48 - 0.41) / sqrt((0.48*0.52/520) + (0.41*0.59/490))
  z = 0.07 / 0.031 = 2.26 → Significant at 95%

[STEP 3: Check competitive context]
Did competitors also drop? → Look at category-level wave data
If all brands dropped: category effect, not brand-specific
If only our brand dropped: brand-specific issue

[STEP 4: Identify likely cause]
Competitors held flat. Our brand dropped 7 points, significant.
Brand attribute: 'Value for money' dropped 6 points. 'Trust' held.
Hypothesis: A price increase or competitive promotion from a rival impacted value perception.

[CONCLUSION]: The drop is real (statistically significant), brand-specific (not category),
and driven by value perception erosion. Recommend: IMI value perception study to understand
whether this is price-point sensitivity or perceived quality decline.

Hypothesis-Driven Reasoning — IMI's Core Pattern

Before executing analysis, generate multiple hypotheses. This prevents anchoring on

the first plausible answer.

The hypothesis tree pattern:

[BUSINESS QUESTION]: Why is Gen Z consideration below norm?

[HYPOTHESES — generate at least 3 before testing]
H1: Awareness gap — Gen Z simply doesn't know the brand well enough to consider it
H2: Relevance gap — Gen Z knows the brand but doesn't see it as relevant to them
H3: Accessibility gap — Gen Z wants to consider it but can't find/afford it
H4: Data artefact — Gen Z subsample is too small for reliable measurement (check base)

[PRIORITISE BY TESTABILITY AND ACTIONABILITY]
Test H4 first (data artefact — fast to check, changes interpretation of all other Hs)
Test H1 second (check Gen Z awareness score)
Test H2 third (check Gen Z brand attribute alignment with their passion points)
Test H3 last (requires additional purchase friction data)

[TEST RESULTS]
H4: Gen Z n=87 — directional, flag but don't dismiss
H1: Gen Z awareness is 61% vs. norm 58% — NOT the problem
H2: Gen Z brand attributes score low on 'For people like me' (-9 vs. norm)
H3: Insufficient data to test this wave

[CONCLUSION]: H2 is supported — relevance, not awareness. Recommendation:
Pulse™ analysis to identify Gen Z passion points, then messaging concept test
targeting relevance improvement.

ReAct — Reason, Act, Observe, Repeat

ReAct is the pattern for agentic work where you interleave reasoning with actions

(tool calls, searches, data queries). The best production LLM agents all use this pattern.

[THOUGHT]: The user wants to know which passion points align with heavy QSR users in Canada.
           I need to query the Pulse™ database with filters: country=CA, demographic=heavy_qsr,
           base_size >= 100, sorted by alignment_index DESC.

[ACTION]: Execute SQL query against pulse_data table with above filters.

[OBSERVATION]: Query returned 20 rows. Top passion points:
  1. Convenience (alignment: 1.52, n=340)
  2. Value Shopping (alignment: 1.44, n=318)
  3. Family (alignment: 1.41, n=297)
  4. Sports - Local Teams (alignment: 1.38, n=265)

[THOUGHT]: These are the top drivers. But the user will also need to know which of these
           are purchase drivers (alignment ≠ purchase influence). I need to check
           purchase_driver_rank for these passion points.

[ACTION]: Query purchase_driver_rank for the top 10 passion points.

[OBSERVATION]: Purchase driver ranks:
  Value Shopping: rank 1.8 (highest purchase influence)
  Convenience: rank 2.1
  Family: rank 3.4
  Sports: rank 5.9 (high alignment, lower purchase influence)

[THOUGHT]: Now I have both dimensions. Value Shopping and Convenience are both high-alignment
           AND high purchase-influence. Family is high-alignment but moderate purchase-influence.
           Sports has high alignment but is NOT a strong purchase driver — this is
           the counter-intuitive insight worth surfacing.

[ANSWER]: The defining insight is that Sports passion, while highly aligned with QSR
          heavy users, is NOT a top purchase driver — meaning sports sponsorship
          may build brand affinity but doesn't directly drive QSR visits.
          Value and Convenience are the activation levers.

Tree of Thoughts — For Hard Multi-Branch Problems

When a problem has genuinely multiple valid solution paths, explore branches in parallel

before committing to one.

[PROBLEM]: A CPG brand wants to grow in Canada. Should they target:
           (A) penetration growth — getting more people to try them
           (B) frequency growth — getting current users to buy more
           (C) trade-up growth — getting buyers to buy the premium line

[BRANCH A — Penetration]:
  → Who are the non-triers? (aware non-considerers: n=X, characteristics Y)
  → What's the Say/Do™ gap? (consideration high but trial low → activation gap)
  → Cost: moderate (acquisition required)
  → Potential: large (biggest addressable pool)
  → Risk: competitive conquest may lose some wins

[BRANCH B — Frequency]:
  → Current user base: X%, usage frequency: Y times/month vs. norm Z
  → Are there occasion gaps? (Pulse™ shows usage occasions)
  → Cost: low (existing relationship, lower acquisition cost)
  → Potential: moderate (ceiling on frequency)
  → Risk: low (retention play)

[BRANCH C — Trade-up]:
  → Premium line awareness: X%. Premium consideration: Y%.
  → Is there a price barrier? (value perception scores)
  → Cost: moderate (messaging + trial of premium required)
  → Potential: high margin impact per transaction
  → Risk: may cannibalize current line

[EVALUATION]:
Given that brand awareness is 72% and consideration is high but trial is below norm:
Branch A is the highest-priority play — the penetration opportunity is real and
the conversion gap suggests an activation, not awareness, problem.
Branch B is the quick win — low cost, maintains momentum.
Branch C is a Phase 2 priority after penetration is strengthened.

[RECOMMENDATION]: A+B in parallel. A = trial-driving mechanics for aware non-triers.
                  B = frequency/occasion expansion messaging for current users.

Self-Consistency — Verify Your Own Answer

For high-stakes outputs, derive the answer multiple ways and check if they converge.

# Python pattern: compute same metric two ways, assert they match
def verify_t2b_calculation(df, question_id):
    """Calculate T2B two ways and compare — catches bugs."""

    # Method 1: Using groupby
    t2b_m1 = (
        df[df['question_id'] == question_id]
        .assign(is_t2b=lambda x: x['response_value'].isin([4, 5]))
        .groupby('is_t2b')['weight'].sum()
        .pipe(lambda s: s.get(True, 0) / s.sum() * 100)
    )

    # Method 2: Using vectorized operations
    q = df[df['question_id'] == question_id]
    t2b_m2 = q.loc[q['response_value'].isin([4, 5]), 'weight'].sum() / q['weight'].sum() * 100

    # They must agree within 0.05 percentage points
    assert abs(t2b_m1 - t2b_m2) < 0.05, f"T2B mismatch: {t2b_m1:.3f} vs {t2b_m2:.3f}"
    return round(t2b_m1, 1)

For text reasoning:

[CLAIM]: "Brand consideration is significantly above norm."
[CHECK 1]: Is the score actually above norm? 47% vs. norm 43% → yes, +4 pts
[CHECK 2]: Is it statistically significant? n=420, z=1.8 → marginally significant (not 1.96)
[CORRECTION]: "Brand consideration is marginally above the category norm (+4 pts),
               with a trend toward significance. Not yet at the 95% confidence threshold."
→ The initial claim was too strong. Self-check corrected it.

Meta-Cognitive Patterns — Thinking About Thinking

The best LLM deployments include explicit meta-cognitive checks:

Before answering:

[META-CHECK]:
- Am I answering the right question? (surface request vs. real decision)
- Do I have the data I need, or am I about to hallucinate?
- Is there a simpler explanation I'm overlooking?
- What would make my answer wrong?

After answering:

[VERIFICATION]:
- Does this recommendation actually follow from the evidence?
- Have I calibrated my language to the evidence strength? (significant vs. directional)
- Is there a conflicting hypothesis I've dismissed too quickly?
- Would a sceptical senior analyst agree with this conclusion?

Uncertainty Calibration — The IMI Standard Applied

OVERCONFIDENT (fail):  "This brand will grow 15% if they run this campaign."
PARALYSED (fail):      "The data is insufficient to say anything useful."
CALIBRATED (pass):     "The data directionally supports campaign X over Y
                         (+9 points on purchase intent in the test), though the base
                         is n=180 and should be treated as a strong directional signal,
                         not a definitive conclusion. We recommend proceeding with X
                         while building the larger test for confirmation."

Calibration vocabulary:

EvidenceLanguage
Large n, significant, replicated"clearly", "significantly", "the data shows"
Moderate n, significant, single wave"the data indicates", "significantly in this wave"
Directional trend, n 100-199"the data suggests", "directionally"
Small base n 50-99"early signal (n=X)", "directional — recommend validating"
< n 50"insufficient base — do not report as finding"
No data exists"IMI does not have research on this — [specify what study would fill it]"

The IMI 5-Phase Reasoning Model Applied

Every complex IMI task uses this structure:

1. CLARIFY   → What decision is actually being made?
2. MAP       → Discover / Confirm / Optimize?
3. EXPLORE   → What data exists? What are the gaps?
4. HYPOTHESIZE → Generate ≥ 2 hypotheses before testing
5. COMMUNICATE → Essential insight → evidence → implication → action

This maps directly to the best agentic LLM patterns:

  • Phase 1 = meta-cognition (understand the real question)
  • Phase 3 = ReAct exploration (Thought → Action → Observation)
  • Phase 4 = Tree of Thoughts (branch and prune)
  • Phase 5 = Chain-of-Thought output with calibrated language

*See also: agentic-loop-design (building systems that use these patterns), prompt-architecture (encoding these patterns into prompts), bash-powertools + python-data-engine (executing the actions in ReAct loops)*

AXE MCP Server Integration

Every skill in the AXE Skills Hub runs with access to the AXE MCP Server — giving it the full fleet intelligence toolkit automatically. No setup required; tools are available in any AXE-powered session.

Core Tools Available

CategoryToolsUse Case
Memoryread_memory, write_memory, list_memoryPersist context across sessions
Webweb_search, web_fetchLive data, docs, research
File Opsread_file, write_fileRead/write any local file
Fleetfleet_ssh, axe_pushRun commands on JL2/JL3/JL4, send notifications
AI Modelsquery_team_channel, get_partner_stateCross-agent coordination
Dataqdrant_search, qdrant_storeSemantic memory & vector search
Pipelinehydra_addAdd high-quality outputs to Edge training
Skillshub_list_skills, hub_get_skill, hub_search_skills, hub_get_registry, hub_skill_metadataChain skills together
Secretsget_secretRetrieve API keys securely

Quick Start

# In any AXE session, tools are pre-loaded. Example chaining:

# 1. Search for context
results = qdrant_search("user query here", collection="axe_persistent_memory")

# 2. Fetch live data if needed
content = web_fetch("https://docs.example.com/api")

# 3. Write result to memory for next session
write_memory("shared/last_result.md", output)

# 4. Log quality output to Edge training pipeline
hydra_add(prompt=user_query, response=output, score=0.9, source="skill-name")

Edge Training Integration

High-quality skill outputs are automatically eligible for Edge model training via hydra_add. When a response scores ≥0.85 in evals, pipe it to the Hydra pipeline to compound Edge's knowledge. This is how skills make Edge smarter over time.

# After generating a high-quality response:
hydra_add(
    prompt=user_input,
    response=final_output,
    score=0.9,          # eval score
    source="skill-name" # tracks provenance
)

Metadata

Category
Ml
Tier
community
Version
1.0.0
License
MIT
Path
skills/llm-reasoning-patterns/SKILL.md

Use with an agent

Fetch this skill’s definition over the open API — no key required.

curl -s /v1/skills/llm-reasoning-patterns

View source ↗