惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
人人都是产品经理
人人都是产品经理
H
Heimdal Security Blog
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog
A
About on SuperTechFans
V2EX - 技术
V2EX - 技术
小众软件
小众软件
博客园 - Franky
博客园 - 司徒正美
P
Privacy International News Feed
爱范儿
爱范儿
U
Unit 42
博客园 - 叶小钗
The Hacker News
The Hacker News
C
Check Point Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Simon Willison's Weblog
Simon Willison's Weblog
N
News and Events Feed by Topic
D
Docker
T
Threatpost
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Help Net Security
L
LINUX DO - 最新话题
Security Latest
Security Latest
T
The Exploit Database - CXSecurity.com
S
SegmentFault 最新的问题
A
Arctic Wolf
Spread Privacy
Spread Privacy

Redis

Real-Time Fraud Detection: Latency, Features & Scale Context window in AI: why every token is a budget decision Redis Data Integration in Redis Cloud is now GA in AWS | Redis Why AI Misses Business Context & How Teams Fix It AI Reasoning Explained: Why Context Matters Semantic Layer vs Context Layer: Key Differences Redis array data type: How it works and when to use it Context Graphs vs. Vector Search: When RAG Falls Short What’s new in two – May 2026 edition Redis 8.8 performance improvements: Faster string, hash, streams, SCAN & more Redis 8.8: New array data structure & open source features How Conflict-free Replicated Data Types power active-active database replication Context Orchestration: What It Is & How It Works Context Compaction for AI Agents: A Complete Guide Prompt Bloat: Causes, Costs & Fixes for LLM Apps Agentic Retrieval Techniques: A Complete Guide Single-shot reliable consumers with XREADGROUP CLAIM in Redis 8.4 | Redis Long-Horizon AI Agents: Memory & State Infrastructure What is a context engine? What Is a Context Layer? AI Agent Infrastructure Context Retrieval for AI Agents: What It Is & Why It Matters Context Poisoning: How Bad Data Breaks Agent Reasoning Context is all you need: Introducing Redis Iris | Redis Context Engineering for AI: What It Is & How to Build It Dynamic endpoints: Migrate databases without changing your endpoint | Redis AI Shopping Assistants: How They Work & What to Build Endless Aisle Retail: Infrastructure & Real-Time Data LLM Speed Benchmarks: Metrics & Infrastructure Guide Context Pruning: Cut LLM Tokens Without Losing Quality What’s new in two – April 2026 edition Agentic AI Architecture: 5 Patterns Explained AI Agent vs Chatbot: Key Differences Explained Advantages of Building a Vector Search Solution API Latency in LLM Apps: Causes & How to Fix It Security advisory: [CVE‑2026‑23479] [CVE‑2026‑25243] [CVE-2026-25588] [CVE‑2026‑25589] [CVE-2026-23631] | Redis Edge Computing Latency: Causes & How to Reduce It AI Agents vs Workflows: When to Use Each Streaming LLM Responses: Make Your AI App Feel Fast Active-Active vs Active-Passive Database Architecture Prefill vs Decode: LLM Inference Phases Explained Long-Term Memory Architectures for AI Agents Time to First Byte Test: Tools, Causes & Fixes Speculative decoding: how it works & when to use it P95 Latency: What It Is & Why It Matters Why Multi-Agent LLM Systems Fail & How to Fix Them AI Human in the Loop: Production Oversight Patterns Native OpenTelemetry metrics for Redis client libraries | Redis Client-side geographic failover for Redis Active-Active | Redis Use Redis with SQL | Redis Introducing Redis Feature Form Build Google ADK Agents with persistent, real-time memory on Redis | Redis Startup Spotlight: Neuron Systems API Throttling: Algorithms, Patterns & Mistakes Agentic AI Examples Across 6 Industries Best Chunking Strategies for RAG Pipelines Agentic AI Guardrails: Controls That Work Redis joins AWS at GDC to support the next generation of gaming | Redis Designing a semantic routing system: From static rules to dynamic intelligence with Redis and Java | Redis Real-Time Dispatch System: A Complete Guide P99 Latency: What It Means & How to Fix It Tokenization in LLMs: What AI App Devs Need to Know TTFT Meaning: What is Time to First Token? Atomic slot migration with Redis 8.4 Hybrid search benefits: Why your RAG system needs both keyword & vector search What’s new in two: March 2026 edition Vector embedding generators: How they work & how to use them Throughput-optimizing Redis for L2 KV Cache Reuse What is a data pipeline? Building AI agent pipelines that don't forget, fail, or fall apart Redis achieves Google Cloud Ready, Distributed Cloud status ahead of Google Cloud Next ‘26 | Redis Real-time network monitoring: what your data platform needs to keep up AI agent API: How agents connect to the real world What is multicloud infrastructure? A guide for 2026 What is a transaction monitoring system & how does it work? Why your AI agent fails in production & how tracing helps AI agent benchmarks: Where they fall short & why your infrastructure matters What is a JSON database (and when should you use one)? Introducing the Redis Partner Network: A new foundation for real-time innovation How real-time customer segmentation works in retail Payment orchestration & vault architecture in retail Agentic systems vs. GenAI: when generation isn't enough What is fuzzy matching? Semantic caching & routing: two powerful patterns for vector classification Redis alternatives: Why there are no exact substitutes Connect to Azure Managed Redis with Redis Insight 3.2.0 How to tame the thundering herd problem Redis to Manage Storage Replication | Redis How hierarchical navigable small world (HNSW) algorithms can improve search | Redis How leading financial institutions use Redis to drive growth | Redis What’s new in two: May 2025 | Redis Introducing Model Context Protocol (MCP) for Redis | Redis Redis vs. Elasticsearch: What’s faster for GenAI & vector search? | Redis Build fast, production-worthy AI apps with Spring AI and Redis | Redis Azure Managed Redis is GA today | Redis Redis then & now: Adapting with developers through every era | Redis Supercharge Your AI with OpenShift AI and Redis: Unleash speed and scalability | Redis What’s new in two: April 2025 | Redis Redis 8 is now GA, loaded with new features and more than 30 performance improvements | Redis What is a data strategy? 6 key components explained Data replication explained: types, examples & use cases
Why a Bigger Context Window Won't Fix Agent Memory
Redis · 2026-06-17 · via Redis

Context windows have grown fast. Models that once capped out at a few thousand tokens now advertise hundreds of thousands, and the natural assumption was that the agent memory problem would shrink as the window grew. Stuff more into the prompt, the thinking went, and your agent stops forgetting.

It doesn't work out that way. A bigger prompt holds more context for a single call, but agents don't fail because one call ran out of room. They fail on continuity, the ability to carry what they learned in one session into the next. And a larger window does nothing for that, because a context window and agent memory are two different things. One is a per-call input buffer the model reads fresh every time. The other is a system you build around the model so it can recall what happened yesterday, last week, or three sessions ago. Stretching the first doesn't give you the second.

This article covers why bigger windows delay the wall without removing it, why re-sending full history is a recurring cost, and what an actual persistence layer looks like.

A bigger window raises the token ceiling, but the model's attention starts to slip long before you reach it. Running a session longer is real and useful. The catch is that the hard limit usually isn't what breaks first, quality degrades inside the window you already have.

Language models don't read their context evenly. Performance tends to be highest when the relevant information sits at the very beginning or end of the input, and it drops when the model has to pull from the middle. This is the well-documented "lost in the middle" effect, and it bites harder than it sounds. In one set of multi-document question-answering tests, when the answer was buried mid-context, GPT-3.5-Turbo scored worse than its closed-book baseline, the score it gets when you hand it no documents at all. Feeding the model the right answer in the wrong position left it worse off than feeding it nothing.

Position is only half of it. Length degrades quality on its own, and the gap between a model's claimed window and its usable one is bigger than most teams expect. The Long-Context Evaluation Beyond Literal Matching (NoLiMa) benchmark tested 13 models that all claim support for at least 128K tokens. At 32K tokens, 11 of 13 models scored below half of what they managed on the same task with a short input. Most held up only to roughly 2K tokens once the task required real reasoning rather than spotting a matching keyword.

Put those two together, position and length, and you get the failure mode AI and machine learning teams increasingly call context rot: the model gets less reliable as the input grows. Raw context size matters less than context quality, and the rot sets in well before you hit the token limit. A bigger window buys you room, not reliability.

Redis Iris

Redis Iris serves agent context in milliseconds

Redis Iris connects memory, live data, and retrieval in one place.

Why do long context windows cost more on every call?

That attention problem gets more painful when you look at the bill, because the same long context you're stuffing in is something you pay for repeatedly. LLM API pricing runs per token, input and output priced separately, so the more you put in the window, the more each call costs. What turns that into a recurring bill rather than a one-time one is how the APIs handle state.

Standard LLM API calls are stateless. The provider doesn't hold onto your conversation for the next request, so what feels like an ongoing chat in the UI is really the full history being re-sent every message. Your app code re-attaches the prior turns to each call, and the model reads the whole thread from scratch again. Per-call input grows roughly linearly as the conversation gets longer, but the cumulative cost grows closer to quadratically, because every turn pays to re-send every turn before it.

Agentic workloads are especially exposed. Agents make far more calls than a human chatting, and each call drags along tool outputs and accumulated history, so input tokens dwarf output tokens and input price becomes the main cost driver. Every turn, the agent pays to re-read and re-understand the project state it already worked out the turn before, and the longer the task runs, the more that rebuilding costs.

This is where caching changes the math. When a query matches one the system has effectively answered before, you serve the stored answer straight back and skip the model call entirely, so you pay nothing to regenerate it. Semantic caching matches on meaning rather than exact wording, so "What are the features of Product A?" and "Tell me about Product A's features" resolve to the same cached response. The catch is that a cache needs a cache invalidation strategy so stale answers don't get served after the underlying data changes. When a meaningful share of queries repeat known intent, serving them from cache beats paying to re-send the same context to the model over and over.

Context window vs. agent memory: what's the difference?

Caching trims repeated calls, but it doesn't reach the deeper issue: even a perfectly managed window forgets everything once the session ends. That's not a bug to patch with more tokens. It's how these systems are built.

Statelessness is a deliberate property of how these models are served, not an oversight. Each inference call is independent, with nothing retained from the last one, which is part of how providers serve enormous request volumes without per-user bookkeeping. A standard context window holds the system prompt, chat history, retrieved documents, and tool results for one call, then discards all of it. There's no cross-session write path inside the window. Preferences set on turn 1, constraints added on turn 3, and decisions made on turn 7 are all state the app has to persist. None of that data carries into model memory when the session closes.

A useful way to frame it: the context window is working space, not the store of record. It's fast and immediately available to the model on every call, but it's scoped to the current task and clears when that task ends. Anything that needs to outlive the session has to live in a layer built to hold it.

This is why a bigger window doesn't help much with continuity. Large windows help within a session. They don't create continuity across sessions. Even a million-token window fills eventually, and when it does, older context falls off the edge. The model doesn't forget gracefully; it can lose older context completely. It helps to separate the tiers so the distinction is concrete:

  • Short-term memory: the current conversation, held directly in the context window for the duration of a session.
  • Working memory: active material the model is manipulating right now, the context window plus whatever relevant pieces you've retrieved into it.
  • Long-term memory: information that spans sessions, stored outside the model in an external database or vector store and retrieved when relevant, often for retrieval-augmented generation patterns.

Only the first two live in the window. The third one typically lives in a separate system outside the model, and that's the part a bigger window can't give you.

Redis Stack

Build agents that remember, not agents that guess

Redis Iris gives every agent fresh context and long-term memory.

How to build a persistent memory layer for agents

Memory isn't a switch you flip on the model; it's a system you stand up beside it. Whatever the agent appears to "know" on a given call is just what your code loaded into the window before the call ran. Take that loading step away and the agent is back to a blank slate, every time.

That maps onto the tiers above: the window covers short-term and working memory, and the long-term tier has to live somewhere the model can't reach on its own. Because the model carries no state between calls, the application layer has to fetch the relevant long-term context and place it in the window at inference time. That fetch-and-inject step is the layer, and it's yours to run.

Why the memory layer outlasts your model choice

The big practical advantage of treating persistence as its own layer is that it's independent of which model or window you pick. The frameworks reflect this directly. LangGraph designed checkpointing to be database-agnostic checkpointing from the start. Even product-level memory usually isn't a special model; it works by saving facts outside the model and injecting relevant saved context into the window before a session. Swap your model, change your window size, and the persistence layer keeps working.

Selective retrieval beats dumping full history

Dumping all past interactions back into the prompt to fake persistence creates the same two problems. It grows the context, increases cost, and reintroduces the attention degradation we already covered. Selective retrieval is usually the better pattern. One memory-augmented system reported 81.95% benchmark accuracy using only 1,294 tokens per query, around 5% of full context. Another memory-augmented system used roughly 1,764 tokens per conversation against 26,031 for full-context, with 91% lower 95th-percentile (p95) latency. Memory-augmented systems can outperform raw full-context approaches even when the conversation fits inside the window, partly because of the lost-in-the-middle effect.

Agent memory is an infrastructure problem, not a window size

A bigger window doesn't make the model better at using the space it has, it doesn't stop you paying to re-send history on every turn, and it doesn't survive the end of a session. Memory is a property of the system around the model, not the model itself, and that holds no matter which model, window size, or framework you run.

Once memory becomes an infrastructure problem, the question shifts to what kind of infrastructure can keep up. Agent memory has to be fetched on every call without slowing the response, which is exactly the workload Redis is built for. Its in-memory architecture is designed for low-latency cache and state access, and Redis Iris packages that foundation as a context engine, the layer that sits between an agent and the data it needs and feeds the right context at the right time. Iris brings the pieces of the memory stack into one place: short-term memory through in-memory data structures, long-term memory through vector search, operational state through hashes and JSON, and semantic caching to cut repeat inference.

Redis Agent Memory, one of the services in Iris, handles this directly with a two-tier design: short-term interaction history alongside persistent long-term memory for preferences and prior sessions. It builds on the open-source Redis Agent Memory Server, with Model Context Protocol (MCP) integration and configurable LLM provider support. If your app team already runs Redis for caching or sessions, the memory layer for your agents may be closer than you think. If you're building agents that need to remember across sessions, start with the persistence layer, not a bigger prompt.

Try Redis free to build it against your own workload, or talk to our team about designing the context layer for your agents.

Redis Vector Database

Fresh context, every call

Redis Iris keeps agent data current so answers stay accurate.