Context Engineering 2.0 is here!
Retrieval can find the right fact, and the prompt can still contain several older versions of it.
An agent might pull a current fact, a conversation, a summary, and a document. If the application pastes them all into the prompt as ordinary text, the model has to work out which one reflects the latest information.
The step after retrieval needs to do more than concatenate sources.
More specifically, an assembler checks what belongs in the prompt, gives each piece a status, and builds the window under a fixed layout and token budget.
The Oracle Developer Blog actually has a solid end-to-end walkthrough of how to build this assembler. There’s also a synthetic fact-check example that explains the importance of this step.
A paper originally reports a benchmark score of 0.92, then its authors correct it to 0.78 after finding a data contamination bug.
Retrieval finds the corrected 0.78, but a July summary, an old chat, and the original paper still contain 0.92.
During execution, the assembler first removes records that are out of scope, superseded, deleted, or not yet valid.
It removes exact duplicate text and gives the current fact precedence when claims conflict.
The older material can still be useful. The July summary records what was believed at the time, which helps with bitemporal memory.
But if that summary enters the prompt, the corrected 0.78 must enter at full size too. If it cannot fit, assembly fails.
Next, the assembler ranks what remains and decides how each piece appears in the prompt.
The corrected 0.78 is the current fact.
The July summary stays as history, with a note pointing to the correction.
The old chat is unverified, and the original paper’s 0.92 appears as quoted evidence.
Another retrieved passage also contains the correction.
This means the older 0.92 can still appear in the prompt, but the prompt makes its source and status clear alongside the current 0.78.
In the walkthrough’s example, the assembler excludes seven pieces. Six are superseded, deleted, or not yet valid, and one repeats text already included.
The other 16 fit in the prompt at full length, so nothing else needs to be cut to manage the context window.
The assembler saves a record of what the model received and why. If a response looks wrong later, engineers can inspect that record and rebuild the request if the sources and matching code are still available.
Read the full walkthrough here →
Thanks to Oracle for partnering today!
What happens when an LLM server runs out of KV cache memory?
An LLM response can start streaming normally, then pause while other requests on the same server keep generating.
One possible cause is KV cache memory pressure, where the server is already holding cache data for several requests and doesn’t have enough room to keep all of them progressing.
What happens next depends on how the serving engine manages that memory. The same pressure can show up as a queue before an answer starts or a pause after it has already begun.
When new requests arrive, the engine can leave them waiting until enough cache memory becomes available. Requests already running continue, and the new requests take longer to produce their first token.
But queueing only controls new requests.
It doesn’t solve a shortage among requests that are already running and still need more cache space to finish their ongoing answers.
A request can fit when processing begins and need more memory later. Reserving space for its entire maximum output in advance avoids that risk, but holds capacity other requests could otherwise use.
Allocating memory as needed allows more requests to run together, but with a greater chance of encountering pressure later.
An answer finishing doesn’t always mean all of its cached KV data is discarded. If later requests begin with the same system prompt, the server can reuse the cached computation for that shared beginning. This is called prefix caching.
A support chatbot, for example, may send the same system prompt with every customer message. The server can keep the KV data computed for that prompt after one customer’s answer finishes. Another customer’s request may already be using the same cached data.
When more memory is needed, the engine can overwrite cached data that no running request is using. The completed request is unaffected, and no active response needs to pause. A future request can still use the same prompt, but the server will have to compute the missing KV data again.
The situation changes when the cache space is occupied by requests that are still running. To recover that memory, the scheduler may have to pause one of those requests and release its cache. That is called preemption.
With recomputation, the engine keeps the paused request’s prompt and the tokens it has already generated. When space becomes available, it processes those tokens again to rebuild the KV cache, then continues the answer from where it stopped.
The earlier answer doesn’t need to be generated again, but rebuilding its cache still takes GPU work. The affected user waits through both the scheduling delay and that recomputation. Repeated preemptions can therefore keep the server running while making response latency unacceptable.
An engine with KV offloading support has another option. It can preserve cache data in CPU memory and transfer it back when needed. That avoids rebuilding the offloaded data, but the transfers add work and can slow generation.
KV cache quantization reduces how much memory each cached token occupies. It can allow more requests to remain active, although the effect on answer quality and latency needs testing with the actual model and workload.
Both approaches require support and configuration in the serving engine. A full cache doesn’t automatically enable either one, and an engine without a suitable recovery path can still fail with an out-of-memory error.
For your application, we’d measure how long users wait for an answer to start, and how long it pauses once it starts streaming. A single total response time doesn’t tell us which of these delays the user experienced.
If pauses during generation coincide with preemptions, we’d try allowing fewer requests to run at once. That reduces competition for KV cache memory, but means more incoming requests may have to wait before their answers begin.
We’d test this tradeoff with realistic prompts and response lengths. As we increase the number of simultaneous requests, we’d measure both the initial wait and the pauses during streaming. That gives us a concurrency limit based on the delays our application can tolerate.
KV cache pressure is one of many problems that show up once an LLM app is in production.
If you want to learn more (with hands-on implementations), our LLMOps course covers the full lifecycle, from fundamentals to inference optimization and serving:
Read Part 2 on understanding the core building blocks of LLMs →
Read Part 11 on evaluation of multi-turn systems, tool use evaluations, tracing, and red teaming →
👉 Over to you: How are you testing KV cache pressure in your serving setup?
AI Agent deployment strategies!
Deploying AI agents isn’t one-size-fits-all. The architecture you choose can make or break your agent’s performance, cost efficiency, and user experience.
Here are the 4 main deployment patterns you need to know:
1) Batch deployment
You can think of this as a scheduled automation.

The Agent runs periodically, like a scheduled CLI job.
Just like any other Agent, it can connect to external context (databases, APIs, or tools), process data in bulk, and store results.
This typically optimizes for throughput over latency.
This is best for processing large volumes of data that don’t need immediate responses.
2) Stream deployment
Here, the Agent becomes part of a streaming data pipeline.

It continuously processes data as it flows through systems.
Your agent stays active, handling concurrent streams while accessing both streaming storage and backend services as needed.
Multiple downstream applications can then make use of these processed outputs.
Best for: Continuous data processing and real-time monitoring
3) Real-Time deployment
This is where Agents act like live backend services.

The Agent runs behind an API (REST or gRPC).
When a request arrives, it retrieves any needed context, reasons using the LLM, and responds instantly.
Load balancers ensure scalability across multiple concurrent requests.
This is your go-to for chatbots, virtual assistants, and any application where users expect sub-second responses.
4) Edge deployment
The agent runs directly on user devices: mobile phones, smartwatches, and laptops, so no server round-trip is needed.

The reasoning logic lives inside your mobile, smartwatch, or laptop.
Sensitive data never leaves the device, improving privacy and security.
Useful for tasks that need to work offline or maintain user confidentiality.
Best for: Privacy-first applications and offline functionality
To summarize:
Batch = Maximum throughput
Stream = Continuous processing
Real-Time = Instant interaction
Edge = Privacy + offline capability
Each pattern serves different needs. The key is matching your deployment strategy to your specific use case, performance requirements, and user expectations.
👉 Over to you: What deployment pattern are you using for your AI agents? Or are you combining multiple approaches?
Good day!












