Skip to content

Cognitive Processes: Quick Reference Guide

A concise reference guide for understanding and implementing cognitive process modeling in AI systems.

Table of Contents

  1. 12 Cognitive Stages
  2. Dual Process Theory
  3. Key Concepts
  4. Implementation Checklist
  5. Prompt Template Patterns
  6. Decision Trees

12 Cognitive Stages

StageTimeKey FunctionAI Equivalent
1. Sensory Reception0-50msRaw input encodingInput preprocessing
2. Perceptual Processing50-150msFeature extractionPattern recognition
3. Attention & Filtering100-200msFocus selectionRelevance scoring
4. Memory Access150-300msContext retrievalMemory system access
5. Emotional Processing100-400msEmotional appraisalSentiment analysis
6. Interpretation200-500msMeaning-makingIntent understanding
7. Decision Strategy300-600msFast vs slow choiceRouting decision
8. Evidence Accumulation400ms+ReasoningMulti-step analysis
9. Response Planning500ms-2sContent formulationResponse generation
10. Self-Monitoring200-500msValidationQuality checking
11. Response ExecutionVariesOutput deliveryResponse formatting
12. Feedback & LearningOngoingImprovementLearning system

Dual Process Theory

System 1 (Fast/Intuitive)

  • Speed: ~300ms
  • Characteristics: Automatic, pattern-based, emotional
  • Use When:
    • High confidence (>0.8)
    • Low ambiguity (<0.3)
    • Familiar patterns
    • Time pressure
  • AI Implementation: Pattern matching, cached responses, simple routing

System 2 (Slow/Deliberate)

  • Speed: 500ms - several seconds
  • Characteristics: Analytical, reasoning-based, conscious
  • Use When:
    • Low confidence (<0.6)
    • High ambiguity (>0.5)
    • Complex reasoning needed
    • High importance
  • AI Implementation: Multi-step reasoning, evidence gathering, tool calls

Decision Formula

typescript
if (confidence > 0.8 && ambiguity < 0.3 && complexity < 0.4) {
  return 'fast'; // System 1
} else {
  return 'deliberate'; // System 2
}

Key Concepts

Perceptual Analysis

Purpose: Extract basic features from input Output: Features, tone, patterns, ambiguity, urgency, complexity Cache: 5 minutes

Emotional Appraisal

Purpose: Assess emotional significance Output: Importance, emotional state, response tone, relationship impact Cache: 2 minutes

Memory Integration

Types:

  • Working Memory: Current context (7±2 items)
  • Episodic Memory: Past experiences
  • Semantic Memory: Facts and concepts
  • Procedural Memory: Skills and strategies

Self-Monitoring

Checks:

  • Appropriateness
  • Personality alignment
  • Error detection
  • Goal achievement

Feedback Loops

Types:

  • Immediate: Mid-response adjustment
  • Short-term: Learning from interaction
  • Long-term: Strategy updates

Implementation Checklist

Phase 1: Foundation

  • [ ] Create PerceptualAnalysisService
  • [ ] Add perceptual_analysis_v1 prompt template
  • [ ] Create EmotionalAppraisalService
  • [ ] Add emotional_appraisal_v1 prompt template
  • [ ] Integrate into processUserInteraction()
  • [ ] Add unit tests

Phase 2: Dual Processing

  • [ ] Create DualProcessRouterService
  • [ ] Create System1FastHandler
  • [ ] Create System2DeliberateHandler
  • [ ] Add routing logic to main flow
  • [ ] Add performance metrics
  • [ ] Add integration tests

Phase 3: Advanced Features

  • [ ] Create SelfMonitoringService
  • [ ] Add self_monitoring_v1 prompt template
  • [ ] Create FeedbackAnalysisService
  • [ ] Create LearningSystem
  • [ ] Add feedback collection
  • [ ] Add learning mechanisms

Phase 4: Integration

  • [ ] Create EnhancedCortexService
  • [ ] Integrate all components
  • [ ] Add comprehensive logging
  • [ ] Add monitoring dashboard
  • [ ] Performance optimization
  • [ ] A/B testing setup

Prompt Template Patterns

Pattern 1: Analysis Template

javascript
{
  name: 'analysis_v1',
  template: `
You are the [Layer Name] of an AI system.
Your job is to [purpose].

Input: "{{userInput}}"
Context: {{context}}

Analyze and output ONLY valid JSON:
{
  "field1": "value",
  "field2": 0.0-1.0,
  "field3": ["array", "of", "items"]
}

Guidelines:
- field1: Description
- field2: Range and meaning
- field3: What to include

Output ONLY the JSON object:`
}

Pattern 2: Decision Template

javascript
{
  name: 'decision_v1',
  template: `
You are the [Decision Layer].
Based on the analysis, decide [what to decide].

Analysis: {{analysis}}
Context: {{context}}

Decision Factors:
- Factor1: {{value1}}
- Factor2: {{value2}}

Output JSON:
{
  "decision": "option1|option2",
  "reason": "explanation",
  "confidence": 0.0-1.0
}`
}

Pattern 3: Monitoring Template

javascript
{
  name: 'monitoring_v1',
  template: `
Before responding, check:
- Appropriateness
- Alignment
- Errors
- Goal achievement

Planned Response: "{{response}}"
Input: "{{input}}"
Context: {{context}}

Output JSON:
{
  "approved": true/false,
  "revisions": ["suggestion1"],
  "confidence": 0.0-1.0,
  "reasoning": "explanation"
}`
}

Decision Trees

Routing Decision Tree

Input Received

    ├─ Confidence > 0.8?
    │   ├─ Yes → Ambiguity < 0.3?
    │   │   ├─ Yes → Complexity < 0.4?
    │   │   │   ├─ Yes → System 1 (Fast)
    │   │   │   └─ No → System 2 (Deliberate)
    │   │   └─ No → System 2 (Deliberate)
    │   └─ No → System 2 (Deliberate)

    └─ Confidence < 0.6?
        ├─ Yes → System 2 (Deliberate)
        └─ No → Check other factors → System 2 (Deliberate)

Self-Monitoring Decision Tree

Planned Response

    ├─ Appropriate for context?
    │   ├─ No → Reject, suggest revision
    │   └─ Yes → Continue

    ├─ Matches personality?
    │   ├─ No → Reject, suggest revision
    │   └─ Yes → Continue

    ├─ Errors detected?
    │   ├─ Yes → Reject, suggest revision
    │   └─ No → Continue

    └─ Will achieve goal?
        ├─ No → Reject, suggest revision
        └─ Yes → Approve

Code Snippets

Perceptual Analysis

typescript
const analysis = await analyzePerception(userInput);
// Returns: { features, tone, patterns, ambiguity, urgency, complexity }

Emotional Appraisal

typescript
const appraisal = await appraiseEmotionalSignificance(
  userInput, 
  perceptualAnalysis, 
  relationshipState
);
// Returns: { importance, emotionalState, responseTone, relationshipImpact }

Routing Decision

typescript
const decision = selectProcessingPath(
  perceptualAnalysis,
  emotionalAppraisal,
  interactionAnalysis,
  context
);
// Returns: { path: 'fast' | 'deliberate', reason, estimatedTime, confidence }

Self-Monitoring

typescript
const monitoring = await monitorResponse(
  plannedResponse,
  userInput,
  context,
  personality
);
// Returns: { approved, confidence, revisions, reasoning }

Performance Benchmarks

Target Times

  • Perceptual Analysis: < 200ms
  • Emotional Appraisal: < 300ms
  • Fast Path (System 1): < 500ms total
  • Deliberate Path (System 2): < 3 seconds total
  • Self-Monitoring: < 400ms

Cache Hit Rates

  • Perceptual Analysis: Target > 60%
  • Emotional Appraisal: Target > 50%
  • Routing Decisions: Target > 70%

Common Patterns

Pattern: Multi-Stage Processing

typescript
// Stage 1
const perceptual = await analyzePerception(input);

// Stage 2
const emotional = await appraiseEmotionalSignificance(input, perceptual);

// Stage 3
const routing = selectProcessingPath(perceptual, emotional, analysis);

// Stage 4
const response = routing.path === 'fast' 
  ? await handleFastPath(...)
  : await handleDeliberatePath(...);

// Stage 5
const monitoring = await monitorResponse(response, input, context);

Pattern: Caching

typescript
const cacheKey = normalizeInput(userInput);
const cached = cache.get(cacheKey);
if (cached && !isExpired(cached)) {
  return cached.result;
}
const result = await process(input);
cache.set(cacheKey, result);
return result;

Pattern: Fallback

typescript
try {
  return await enhancedProcessing(input);
} catch (error) {
  logger.error('Enhanced processing failed', error);
  return await basicProcessing(input); // Fallback
}

Troubleshooting

Issue: High Latency

Solutions:

  • Increase cache TTL
  • Use fast path more aggressively
  • Parallel processing
  • Optimize prompt templates

Issue: Low Accuracy

Solutions:

  • Improve prompt templates
  • Add more context
  • Use deliberate path more
  • Enhance self-monitoring

Issue: Cache Misses

Solutions:

  • Normalize input better
  • Increase cache size
  • Adjust cache key strategy
  • Pre-warm cache


Glossary

  • Ambiguity: Uncertainty in input interpretation (0.0-1.0)
  • Complexity: Cognitive load required (0.0-1.0)
  • Confidence: Certainty in understanding (0.0-1.0)
  • Salience: Importance/attention-worthiness
  • Valence: Emotional positivity/negativity
  • Arousal: Emotional intensity
  • Somatic Markers: Bodily emotional signals

Document Version: 1.0
Last Updated: 2024
Purpose: Quick reference for cognitive processes implementation

ASO Universal Consciousness System Documentation