跪拜 Guibai
← All articles
Algorithms · Artificial Intelligence

Four-Layer Memory Architecture: How Huolala's AI Agents Remember, Self-Evolve, and Lift Conversion by 1.7pp

By 货拉拉技术 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Costing only 0.2s extra per response, this architecture buys a 1.7pp conversion gain, a 1.6pp churn reduction, and a 75% profile coverage rate within two weeks—concrete numbers for any team building conversational agents that need to survive long, multi-session customer journeys instead of resetting each time.

Summary

Conversational agents at scale often reset to zero on every new session. Huolala's engineering team built a four-layer memory architecture that turns that reset into an accumulating cognitive base: L0 stores raw dialogue faithfully, L1 extracts intent and emotion per message, L2 owns state machines and strategy dispatch, and L3 maintains six long-term user profile dimensions. The layers feed forward: raw data becomes perception, perception feeds decisions, decisions accumulate into profiles, and profiles guide future interactions.

The design directly addresses the 'octopus tragedy'—individual intelligence that never gets inherited across generations. Instead of flat tags like 'user state = not ordered', the system keeps the full evidence chain: tone, response intervals, excuses, and stage context. It also bridges channels by keying on user identity, so a phone call's outcome carries into an instant messaging session. The experiment ran for two weeks with account splitting: conversion rate went from 58.3% to 60%, average messages dropped from 18.4 to 12.1, churn fell from 2.8% to 1.2%, and profile coverage reached 75%. The trade-off is 0.2s extra per response (0.25s vs 0.45s), which the team considers worth it.

Takeaways
— Huolala's four-layer memory stack: L0 stores raw messages and dialogue with no processing, L1 extracts per-message intent and emotion, L2 manages state machines and strategy dispatch, L3 keeps six user profile dimensions (price sensitivity, trust, operational proficiency, preferred time slot, busy tag, response style).
— L0 persists in real time, L1 runs near-real-time analysis per message, L2 dispatches after each message, and L3 recalculates all six dimensions daily at 2 AM plus real-time updates after a user sends 5 or more messages.
— Cross-channel integration uses user identity as the primary key to link phone and instant messaging sessions; phone call end-state is written to L0 and read at the start of an IM session to pick the right guidance target.
— Common flat-label memory systems fail on emotion traceability (e.g., 'OK, OK' as perfunctory), cross-session continuity, cross-channel unification, and token efficiency; Huolala's approach replaces them with a progressive evidence chain.
— In a two-week A/B test with account splitting, conversion rose from 58.3% to 60%, average messages fell from 18.4 to 12.1, churn dropped from 2.8% to 1.2%, and profile coverage went from 0 to 75%.
— Strategy self-evolution retired 1% of strategies (two strategies) during the trial, moving from manual review cycles of 2–3 weeks to automated elimination based on effect feedback.
— The cost is a 0.2s latency increase per turn (0.25s baseline vs 0.45s with progressive memory), which the team judged acceptable for the conversion and churn gains.
— The architecture is channel-independent at the profile layer; price sensitivity and trust levels are shared across phone and IM, with nightly merging of both channels' data.
Conclusions

The 'octopus tragedy' framing is a useful way to think about why conversational agents stall: without an inheritance mechanism, every session is a fresh start, and the cost compounds over long user journeys with 3–5 interruptions.

Separating raw data (L0) from interpretation (L1) and decision (L2) avoids the classic mistake of storing conclusions without evidence; the model only sees what the system has carefully distilled, but the full chain remains for trace-back.

The 0.2s latency penalty is surprisingly small for the complexity added, suggesting that layered memory can be implemented without crippling response times when design keeps layer updates asynchronous and incremental.

Reaching 75% profile coverage in two weeks indicates the bootstrap loop is fast; the daily batch plus in-session micro-updates after 5 messages strikes a practical balance between freshness and cost.

A 1% strategy elimination rate is conservative; it suggests the team prioritized stability over aggressive self-optimization, and the real win was replacing a 2–3 week manual review cycle with an automated feedback signal.

Concepts & terms
Progressive memory architecture
A four-layer memory design (L0 raw data, L1 perception, L2 decision, L3 profile) where each layer builds on the previous one, moving from unprocessed facts to structured long-term user knowledge. It contrasts with flat tags by preserving the evidence chain and enabling cross-session continuity.
Cognitive flywheel
A self-reinforcing loop where profile dimensions evolve in real time from user interactions, and communication strategies are automatically eliminated or retained based on outcome feedback, making the system progressively more accurate and personalized.
Octopus tragedy
A metaphor used by the article: octopuses exhibit individual intelligence but have no generational knowledge transfer, so every individual must learn everything from scratch. Applied to AI agents, it describes the failure mode where a system resets to zero on each new conversation, never accumulating understanding across sessions or channels.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗