Layered Architecture
A sophisticated multi-layered hierarchy that creates functional clinical intelligence through unified memory-knowledge-reasoning integration
Amigo's memory architecture employs a sophisticated, multi-layered hierarchy (L0, L1, L2, L3) that creates functional clinical intelligence with perfect memory as one of its capabilities. This isn't just a memory system—it's a complete cognitive framework that generates multiple interconnected feedback loops between global patient understanding and local processing. The architecture operates through distinct post-processing and live session phases, serving as a critical component of the unified Memory-Knowledge-Reasoning (M-K-R) system.
Why Four Layers: Maintaining Sufficient Statistics Across Timescales
The hierarchical structure isn't an architectural preference—it emerges from maintaining information at multiple temporal scales. Each layer compresses what came before while preserving what matters for outcomes:
L0: Raw transcripts—complete history
L1: Information gain—what's genuinely new
L2: Episodic patterns—recurring structure over weeks/months
L3: Functional dimensions—stable patterns across episodes
Think of it like a funnel: raw observations (thousands of details) → what's new and relevant → recurring patterns → stable dimensions that drive outcomes. L3 ultimately contains a sparse set of functional dimensions that explain substantial outcome variance, even though raw observations have thousands of dimensions.
Why temporal aggregation matters: Some patterns are invisible at short timescales. A patient's medication adherence looks random day-to-day, but monthly accumulation reveals 2-3 week cycles tied to work stress. You can't detect monthly cycles from daily snapshots—you need L2's episodic accumulation bridging L1 (daily extractions) and L3 (stable dimensions across time).
Live Conversation Processing
During live interactions, L3 provides memory at the right interpretation, precision, and depth to power knowledge application and reasoning without retrieval latency that would degrade reasoning quality:
L3 (Always Available)
Memory-Knowledge-Reasoning Integration: L3 provides memory at the precise interpretation depth needed for clinical knowledge application and reasoning
Memory maintained at the specific precision and depth required for different clinical reasoning tasks with immediate availability
Professional identity ensures memory interpretation matches knowledge application requirements without retrieval delays
Healthcare decisions powered by memory-knowledge-reasoning unity where current symptoms connect to patterns through proper contextual depth AND zero-latency access
Unified context with immediate availability enables high-quality reasoning because memory, knowledge application, and reasoning operate on consistently interpreted information without retrieval interruption
Rare Recontextualization (Adds Latency)
Perfect Reasoning Foundation: Rare expansion occurs only when genuinely new context emerges, not due to L3 limitations - L3 provides complete reasoning foundation
Complete Memory-Reasoning Foundation: L3 provides complete memory at the interpretation depth needed for clinical reasoning with immediate availability
Targeted Historical Insight Extraction: Expansion occurs when L3-guided reasoning identifies opportunities to extract additional insights from historical context
Complete Context Expansion: Queries generated with full L3 context enable precise extraction of genuinely valuable historical insights
Perfect Recontextualization: Past L0 conversations recontextualized through L3's complete unified context, enabling reasoning that extracts maximum value from historical information
Complete Professional Integration: Clinical knowledge fully integrated through L3's comprehensive professional context
Unified Memory-Knowledge-Reasoning: L3 enables complete coherent reasoning across all information with the precision depth required for clinical intelligence
Post-Processing Memory Management
Amigo implements a sophisticated post-processing cycle that creates L3 through progressive synthesis:
L0 → L1: Memory Extraction with L3 Anchoring
Net-New Information Determination: L3 determines what constitutes genuinely new information worth extracting from L0 transcripts
Contextual Interpretation: L3 provides the interpretive lens for understanding L0 conversations from complete historical perspective
Professional Identity Targeting: Service provider background shapes what information is deemed critical for extraction
Dimensional Blueprint Guidance: L3's dimensional framework guides extraction targeting based on functional importance
Perfect Source Linking: Each L1 memory maintains linkage to source L0 for future recontextualization needs
Why unfiltered extraction matters: L1 captures ALL deviations from L3's current model—even seemingly irrelevant details. Consider a patient whose blood sugar seems randomly unstable. When they mention "work deadlines Tuesday" or "feeling stressed Thursday," these seem unrelated to blood sugar control. But unfiltered capture allows L2 to later discover the stress-medication-timing pattern that causes instability. If we filtered "irrelevant" mentions early, we'd never discover this hidden structure.
L1 → L2: Episodic Synthesis when Accumulation Threshold Reached
Accumulation-Based Synthesis: When net-new information accumulation reaches threshold, L1 memories are synthesized into L2 episodic user model
L3-Anchored Synthesis: L1 memories synthesized into L2 episodic model with complete L3 awareness
Information Density Management: Prevents explosion while maintaining critical insights
Dimensional Organization: Professional identity guides how information is structured in episodic model
Temporal Coherence: Maintains chronological understanding while creating episodic synthesis
Boundary Prevention: L3 anchoring prevents information loss at processing boundaries
How temporal aggregation reveals structure: Continuing with our blood sugar example: daily L1 extractions ("work deadline," "stressed," "missed dose") look disconnected. But accumulating them over weeks/months allows L2 synthesis to identify the 2-3 week cycle: work stress → medication timing disruption → blood sugar instability. The pattern becomes visible only through sufficient temporal aggregation.
Efficient updates: The system doesn't reprocess all history. Updates cascade through layers while maintaining sufficiency and keeping computation tractable.
L2 → L3: Global Model Evolution through Boundary-Crossing Synthesis
Global Model Merger: Multiple L2 episodic models merged to evolve L3 across all time
Boundary-Crossing Synthesis: Merges L2 episodic models while preventing information density explosion
Complete Temporal Coverage: Creates unified understanding across entire patient history
Dimensional Evolution: User dimensions refined based on patterns discovered across episodes
Professional Identity Integration: Maintains clinically relevant interpretation throughout merger
Continuous Improvement: Each L3 evolution incorporates new insights while preserving historical understanding
Cross-episode analysis discovers dimensions: Completing our blood sugar example: one L2 episode might show a stress-medication pattern, but could be coincidence. When this same pattern appears in three separate quarterly episodes with L3 anchoring, it's not random—it's a stable functional dimension that becomes part of the patient's dimensional blueprint. Now the system can proactively intervene when work stress patterns emerge.
Boundary loss prevention: Naive merging loses information at episode transitions. L3 anchoring solves this by balancing two objectives: find shared patterns across episodes (cross-episode coherence) while preserving what L3 already knows (preventing divergence from current understanding). Think of it like maintaining a stable reference point while charting new territory—you need both the map you have and the new discoveries.
Emergent sparsity at scale: Across populations, a sparse set of functional dimensions explains substantial outcome variance. This isn't imposed by regularization—it emerges because true causal structure is sparse. Work stress patterns, circadian rhythms, medication adherence styles—these patterns generalize across patients while noise averages out.
Dimensional Evolution and Clinical Intelligence
The system creates multiple interconnected feedback loops between global patient understanding and local processing:
Self-Improving System: This complete cycle creates a self-improving clinical intelligence system where discovered patterns in patient groups can retroactively improve the interpretation of all historical data through dimensional evolution and temporal backfill, ensuring optimal clinical understanding evolves across the entire patient population.
High-Bandwidth Cross-Layer Integrations
Contextualized Historical Access: L3 provides interpretive context for direct L0 access during recontextualization
Temporal Bridging: L3 serves as bridge between present understanding and raw historical events
Selective Retrieval: L3 dimensions guide which L0 sessions are relevant for expansion queries
Interpretive Anchoring: Raw L0 data interpreted through L3 global context rather than isolated historical perspective
Cross-Time Integration: Current L3 integrates insights from previous L3 snapshots
Dimensional Continuity: User dimensions evolve while maintaining continuity across L3 generations
Pattern Accumulation: Long-range patterns emerge through L3-to-L3 synthesis over time
Boundary-Crossing Intelligence: L3 evolution prevents information loss across processing boundaries
Net-New Determination: L3 determines what constitutes genuinely new information during L0→L1 extraction
Interpretive Lens: L3 provides interpretive framework for understanding historical context during extraction
Dimensional Anchoring: L1 extractions anchored against L3 to prevent misinterpretation
Professional Identity Integration: L3 professional identity guides L1 extraction targeting and prioritization
Coherent Aggregation: Multiple L2 episodic models synthesized into L3 through Boundary-Crossing Synthesis
Context Preservation: L2→L3 synthesis maintains episodic insights while creating global coherence
Dimensional Evolution: L3 dimensional framework evolves based on patterns discovered across L2 episodes
Information Density Management: Synthesis prevents information density explosion while preserving critical insights
User Understanding ↔ Dimension Definition Feedback Loops
Direct User Understanding
Immediate Clinical Context: User understanding directly informs clinical decision-making in live sessions
Dimensional Application: Current dimensional definitions applied to interpret patient information
Professional Identity Filtering: User understanding filtered through professional identity lens
Real-Time Contextualization: Present user state contextualized against historical understanding
Dimension Definition Evolution
Pattern Recognition: System recognizes when dimensional definitions are suboptimal for patient groups
Drift Detection: Meta-analysis identifies when user understanding patterns diverge from dimensional framework
Adaptive Optimization: Dimensional definitions modified based on discovered user understanding patterns
Professional Identity Evolution: Meta-level adaptation of how professional identity guides interpretation
Framework Evolution
System Learning: Meta-meta analysis of how dimensional evolution patterns themselves can be optimized
Attention Pattern Evolution: System evolves its own attention patterns based on meta-level insights
Framework Optimization: Meta-meta feedback optimizes the dimensional evolution process itself
Cross-Population Intelligence: Meta-meta insights applied across entire patient populations
Feedback Integration
Object→Meta: Real user understanding patterns inform dimensional definition changes
Meta→Object: Evolved dimensional definitions improve real-time user understanding quality
Meta→Meta-Meta: Dimensional evolution patterns inform framework optimization strategies
Meta-Meta→Meta: Optimized frameworks improve dimensional evolution effectiveness
Cross-Temporal Integration: Feedback loops operate across multiple time horizons simultaneously
Overcoming the Token Bottleneck
The Core Constraint: Current language models are constrained by the token bottleneck: they must squeeze high‑dimensional internal reasoning into low‑bandwidth text tokens, sharply limiting their ability to preserve complex state across steps.
The layered memory system functions as an external high-dimensional memory store that preserves information that would otherwise be lost in token-based reasoning. This is crucial for the integrated M-K-R cycle:
While token-based reasoning loses significant information density, our L0 layer maintains complete, verbatim records with perfect fidelity, forming a reliable Memory base for the M-K-R system.
The system preserves multidimensional relationships that would be flattened in token externalization, providing richer Memory context for Knowledge and Reasoning.
While maintaining perfect ground truth (L0 Memory), the system creates increasingly abstracted representations (L1, L2 Memory) that optimize for efficient retrieval and integration into the M-K-R cycle, ensuring high-bandwidth interplay.
Last updated
Was this helpful?

