The Predict-Calibrate Pattern: Keeping User Profiles Compact and Context Windows Lean
Discover how Aletheia's Predict-Calibrate pattern manages evolving user profiles without blowing up your LLM context window.
The Predict-Calibrate Pattern: Keeping User Profiles Compact and Context Windows Lean
One of the biggest challenges in building persistent AI agents is managing the "Core Profile." As users interact with your agent over months and years, their preferences, life situations, and relationships evolve.
If you simply append every new fact to a profile document, it quickly balloons. Within weeks, you're passing a massive, contradictory profile to your LLM on every turn, burning through your context window budget and increasing latency.
- "User lives in NYC." (March 2025)
- "User hates the cold, thinking of moving." (December 2025)
- "User moved to Miami." (February 2026)
Standard RAG struggles here. It either retrieves everything (confusing the LLM) or misses the latest update.
Aletheia's Predict-Calibrate Architecture
Aletheia solves this through a continuous state tracking pattern we call Predict-Calibrate.
Instead of treating memory as a growing pile of logs, Aletheia maintains a highly distilled JSON object representing the user's permanent state.
When new information arrives during a session, Aletheia doesn't rewrite the whole profile. It runs a specialized distillation pass designed to identify only what has genuinely changed or is entirely new.
The Flow
- The Existing Profile: Aletheia holds the current compact profile (e.g.,
{ "location": "NYC", "car": "White Mercedes" }). - The New Session: The user chats with the agent: "I finally made the move to Miami today!"
- The Delta Extraction: Aletheia's core state engine evaluates the new session against the existing profile. It is instructed to extract only the delta.
- The Update: It returns
{ "location": "Miami" }. Aletheia applies this patch to the core profile. Aletheia's Fact Supersession graph also marks the NYC fact as "stale".
Benefits for Developers
The Predict-Calibrate pattern is built into Aletheia's DNA. This means:
- Microscopic Context Usage: Your Core Profile stays tiny, even after years of interaction. You only pass the distilled truth to your agent's system prompt.
- No Contradictions: Because Aletheia patches the state and supersedes old facts, your LLM never gets confused about where the user currently lives.
- Extreme Performance: By computing only deltas, the background consolidation tasks run much faster and cheaper.
Predict-Calibrate in the broader memory system
The Predict-Calibrate pattern depends on several underlying primitives. Fact supersession provides the graph-based version lineage that tracks profile changes over time. Neural-symbolic extraction identifies the entities and preferences that the profile tracks. Temporal ranking ensures the current profile state is preferred over historical snapshots during retrieval.
Stop paying for bloated context windows filled with obsolete data. Build agents that remember like humans do.
Explore how Aletheia manages state in our Documentation or try the interactive demo.