All articles
    rag
    deepseek
    anthropic
    openai
    context-engineering
    attention
    ai-architecture
    ai-engineering
    agentic-ai
    context-runtime

    The Context Wars, Part III: The AI Operating System

    June 29, 2026redevops.io
    The Context Wars, Part III: The AI Operating System

    "The best technology is the one you stop noticing."

    In Part I we explored why Retrieval-Augmented Generation (RAG) became the industry's default: reading a million-token context on every question doesn't scale economically. In Part II, DeepSeek's answer changed the model itself: Compressed Sparse Attention, Heavily Compressed Attention and sliding-window attention reduce the context the model actively reasons over without losing what matters.

    These solve different parts of the same problem: one retrieves less, the other remembers better. Which leaves one question: what if neither is enough?

    Four architectures circling the same problem (context), each optimizing a different bottleneck
    Scroll the diagram sideways to read itFull size

    Three ways to solve the same problem

    Each optimizes a different bottleneck, which is why no single approach is likely to dominate.

    Classical RAG

    RAG is the most practical solution for enterprise AI: it retrieves only the documents that appear relevant. Its strength is economics. Processing 2,000 carefully selected tokens is dramatically cheaper than 200,000; the expensive attention runs over a smaller prompt, and the heavy lifting moves to cheap retrieval infrastructure. That's why RAG became the default: scalable.

    Strengths

    • Lowest inference cost
    • Smallest prompts
    • Works with every foundation model
    • Continuously updateable knowledge
    • Excellent for private enterprise information
    • Model-independent
    • Mature ecosystem

    Weaknesses

    Every RAG implementation shares one limitation: the retrieval engine must predict what the model will need before it has started reasoning, and sometimes it's wrong. More documents reduce the risk but inflate the prompt; smaller prompts risk missing critical information. Hybrid retrieval, BM25, reranking, GraphRAG, parent-child chunking and contextual retrieval improve quality, but none eliminates the prediction problem.

    Classical RAG search flow: question → vector, keyword and graph search → reranker → context assembly → LLM
    Scroll the diagram sideways to read itFull size

    DeepSeek

    DeepSeek attacks a different bottleneck: it asks "How do we reduce the attention the model actually performs?", pushing complexity into the Transformer. The model remembers more efficiently, changing the economics of long-context reasoning. It moves context selection: RAG selects before inference, DeepSeek during.

    Strengths

    • Better long-context recall
    • Reduced "lost in the middle" degradation
    • Smaller KV cache growth
    • Less dependence on retrieval quality
    • Better utilization of million-token contexts

    Weaknesses

    Compressed attention doesn't eliminate external knowledge: a model still cannot retrieve a document it has never seen. Private enterprise data, live databases, APIs, real-time telemetry, customer conversations remain retrieval problems. DeepSeek changes how context is processed; RAG changes what.

    DeepSeek attention: entire context → CSA → HCA → sliding window → reasoning
    Scroll the diagram sideways to read itFull size

    Anthropic

    Anthropic's recent work suggests a third philosophy: treat context as a continuously evolving system, the shift from prompt engineering to context engineering. The question moves from "How do I write a better prompt?" to "How should information flow through an AI system?" Conversation history, agent memory, tool outputs, retrieved knowledge, working notes and temporary summaries all compete for one finite context budget, so the problem becomes lifecycle management: context as mutable state from immutable prompts. If RAG is a database and DeepSeek a better CPU, Anthropic is an operating system managing memory.

    Strengths

    • Excellent long-running conversations
    • Better information organization
    • Context compaction
    • Strong coding workflows
    • Reduced manual prompt engineering

    Weaknesses

    Context engineering still depends on the underlying model: it doesn't change attention mathematics or retrieve unseen knowledge, and it optimizes how available information is selected, preserved and reused.

    Anthropic context lifecycle: conversation → retrieve → compress → cache → summarize → next prompt, looping back
    Scroll the diagram sideways to read itFull size

    OpenAI

    OpenAI optimizes yet another bottleneck. Its visible innovation is orchestration: prompt caching, reasoning effort, planning, tool execution, verification. It schedules the work: each stage gets only what it needs, cutting unnecessary computation. It also spends more compute at inference for reasoning quality: DeepSeek spends engineering effort reducing computation, OpenAI spends computation improving engineering. Opposite philosophies.

    Strengths

    • Excellent multi-step reasoning
    • Strong agent workflows
    • Prompt caching
    • Better decomposition of complex problems
    • Natural integration with tools

    Weaknesses

    This introduces system complexity (planning, scheduling, verification, model routing, state management), and the architecture becomes increasingly distributed. Some capabilities are documented; the internals remain proprietary.

    OpenAI as a scheduler: planner → workers → verifier → tool → merge → answer
    Scroll the diagram sideways to read itFull size

    Where context lives

    Where context lives is the core difference between all four.

    ArchitectureWhere context livesPrimary optimizationBiggest weakness
    Classical RAGExternal vector DBReduce inference costRetrieval may miss information
    DeepSeekInside the TransformerImprove attention efficiencyCannot retrieve unseen knowledge
    AnthropicContext lifecyclePreserve useful informationDoesn't change attention itself
    OpenAISystem orchestrationDivide reasoning across workersHigher system complexity
    QuestionRAGDeepSeekAnthropicOpenAI
    Where is intelligence added?RetrievalAttentionRuntimePlanner
    Where is computation saved?Before inferenceDuring inferenceAcross sessionsAcross tasks
    Primary resource optimizedTokensAttentionContextReasoning

    How much context can a model actually use?

    Everyone hears "1M context!" and "2M context!" The more important question is how much of that context the model can actually use.

    QuestionClassical RAGDeepSeekAnthropicOpenAI
    Can process million-token documents?Only after retrievalYesYesYes
    Maintains high recall over long context?Depends on retrievalBestGoodGood
    Solves Lost-in-the-Middle directly?Avoids itYesPartiallyIndirectly
    Reads every token?NoMostly compressedDependsSplit across workers
    Handles live enterprise data?ExcellentNeeds retrievalExcellentExcellent

    The Context Wars are about where context should live: RAG moves it into databases, DeepSeek into attention, Anthropic into system state, OpenAI into orchestration.

    Seen that way, the competition almost disappears. These systems relocate the same responsibility to different layers of the stack.

    The real question

    None of these companies is competing on context windows anymore. They compete on where context should live, and the next generation of systems will do all four at once.

    Three generations, one problem

    The first generation of AI applications was built around prompts, the second around retrieval, the third around reasoning models. None solves the same problem: they make individual model calls smarter but don't optimize entire AI systems. Every production AI application eventually becomes a context management problem:

    • Which model should execute this task?
    • Should retrieval be used, and which strategy?
    • Should context be compressed?
    • Should another model verify the answer?
    • Should work be parallelized?
    • Should the system spend $0.02 or $2?

    Those decisions belong in infrastructure, outside application code. DeepSeek V4 makes orchestration more valuable. Better reasoning inside a model doesn't remove the need to optimize decisions across an entire AI system.

    The next competitive advantage

    The next competitive advantage will be systems that continuously optimize themselves. Context Runtime is one possible implementation: applications describe intent; the runtime chooses an execution strategy, optimizes it against cost, latency, quality and security constraints, executes it, then learns from the outcome.

    Context Runtime as a cost-based planner: intent → evaluate strategies → cost optimization → execution graph → execute → measure → learn, feeding back so every request improves the next
    Scroll the diagram sideways to read itFull size

    That mirrors how databases evolved from executing handwritten queries to cost-based query planners.

    SQL didn't disappear.

    The optimizer became indispensable.

    AI is following exactly the same trajectory.

    The future of AI will belong to the systems that make the best decisions about how context is used.


    redevops.io builds source-available AI infrastructure for context engineering and retrieval optimization. Context Runtime (the self-optimizing execution layer described here) and ReDevOps RAG are self-hostable and run on hardware you can actually afford.

    Want ReDevOps in your Google Top Stories & AI results?Follow ReDevOps on Google