The core challenge in modern personalized AI is a mismatch of scales. Human behavior is longitudinal, spanning years of social media posts, thousands of product purchases, and intricate sequences of app interactions. Conversely, the Large Language Models (LLMs) used to process this data are "short-sighted," constrained by finite context windows that can only ingest a fraction of a user’s total history.
When we force-fit years of data into a few thousand tokens, we usually resort to truncation—deleting the "distant" past. However, research across recommendation systems, mental health detection, and user modeling suggests that the most critical signals for understanding a person often lie in those discarded fragments. To solve this, researchers are moving away from simple text-dumping toward sophisticated architectures that filter, compress, and align historical data.
The Context Bottleneck
Standard Transformers process sequences with quadratic complexity, making it computationally expensive to expand the context window to accommodate a user's entire digital life. As noted in the LaMP benchmark by Alireza Salemi and Michael Bendersky, simply including a user's entire record is often impossible. This limitation is felt across domains:
- In Recommendation: Ruobing Xie and colleagues found that InstructRec must truncate interaction histories, potentially losing long-term preference signals.
- In Mental Health: Raja Kumar and Kishan Maharaj observe that detecting mental disorders requires a longitudinal view that exceeds the memory of modern models.
- In UI Testing: Systems like Trident struggle to detect bugs that only emerge after long, complex user journeys because the high-resolution UI data quickly overwhelms the model's memory.
Filtering and Gating for High-Signal History
One solution is to stop treating all history as equally important. In GateFormer, Peitian Zhang and Zheng Liu introduce a learnable "gating" module. This module acts as a sieve, filtering out 90% of a user's browsing history before it ever reaches the heavy Transformer. By selecting only the most informative keywords, they achieve a 10x compression rate while maintaining accuracy.
Similarly, Niranjan Balasubramanian and H. Andrew Schwartz used hierarchical attention to predict personality. Their model uses word-level attention to understand individual posts and message-level attention to prioritize "high-signal" posts (like a party description) over "low-signal" noise (like a status update about a broken phone).
Retrieval-Augmented Personalization
If we cannot fit the whole history in the prompt, we can use a "search engine" for the user's past. The LaMP framework demonstrates that augmenting prompts with specifically retrieved historical data—rather than the most recent data—can boost performance by over 20%. This shifts the model's role from a "memory bank" to a "reasoning engine" that operates on a curated subset of facts.
Aligning Semantic and Behavioral Spaces
Traditional recommendation systems are very good at processing long histories because they use "ID embeddings"—compact mathematical vectors that represent users and items. However, these vectors lack the semantic reasoning of LLMs.
Researchers like Lianghao Xia (RLMRec) and Li Zhang (RA-Rec) propose alignment. Instead of converting a user's 1,000-item purchase history into a massive text prompt, they use the LLM to generate a "reasoned" profile and then align it with the efficient ID-based signals. This allows the system to benefit from the LLM’s deep understanding without the token-limit overhead of raw text logs.
Summarization into Natural Language Profiles
Another emerging direction is to replace raw logs with human-readable summaries. Joyce Zhou and Thorsten Joachims developed the Language-based Factorization Model (LFM), which uses an LLM to condense a user's history into a concise textual profile.
This approach, further refined by Zhaolin Gao in LangPTune, uses reinforcement learning to ensure these summaries aren't just readable, but are specifically optimized to help the model make better recommendations. By turning a thousand clicks into a single paragraph like "User enjoys 19th-century Russian literature but dislikes modern thrillers," the system bypasses the context window limit entirely.
History as a Signal, Not Just Text
Finally, some researchers suggest that the best way to handle long-term history is to stop treating it as text. Raja Kumar treats social media history as a time-series signal. By calculating the similarity of each post to a "disorder anchor" over time, they compress years of data into a simple sequence of scores. This method reduced computational costs by 330 times while improving the detection of mental health shifts, proving that for long-term modeling, the shape of the history is often more important than the content of every word.