Dev48
Language
  • About
  • Services
  • Industries
  • Technologies
  • Articles
  • Contacts
Book a call
    Home/Articles/Stop making your ai reread documents teach it to study them instead
Dev48
info@dev48.org+375 29 320-40-96WhatsApp@isky_by

© 2026 · All rights reserved.

Stop Making Your AI Reread Documents. Teach It to Study Them Instead

Source: Everpure Blog•November 26, 2026 at 03:44 PM

Stop Making Your AI Reread Documents. Teach It to Study Them Instead

Stop Making Your AI Reread Documents. Teach It to Study Them Instead by Everpure Blog Explore how AI document cartridges can help agents answer questions about frequently reused documents faster while reducing rereading and attention memory use. The post Stop Making Your AI Reread Documents.…

Every time an AI agent answers a question about a document, it has to read the whole thing, and it does the same for every request after that. In our previous post, “Cartridges: A Cache You Train, Not a Context You Fill,” we described an AI agent at an investment firm that rereads the same filing from scratch every time someone asks about it, and a law firm whose case files barely change while the questions about those files change constantly. Here’s the short version of what a cartridge is: a set of study notes an AI writes once for a document, so it doesn’t have to reread the document every time someone asks a question. In the blog, we promised to share what happened when we built these. We tested how well they work in practice and whether they’re ready for enterprise use.

We made cartridges for 73 legal and financial documents, most of them realistic law firm files from Harvey’s open source Legal Agent Benchmark and the rest from public SEC filings, with each cartridge one-sixth the size of the document it replaces. On prose-only text, a cartridge kept about 82% of the benefit of having the whole document in the prompt. On dense numeric tables, it was about 64%. When compared with rereading the document, a cartridge cut the wait for the first word of an answer from 1,413ms down to 125ms, and short answers finished about 2.7X sooner. It also needed 6X less memory to hold the document.

What did we measure, and what did cartridges keep?

How do you train and score a cartridge?

When a model reads a document, it saves a numerical summary of each word so later words can look back at it. That saved summary is the KV cache, the model’s working memory of the text in front of it right now. The server usually discards it once the conversation ends, which is why the model rereads the document the next time someone asks about it. The cache is separate from the model’s weights, which hold everything the model learned in training and stay the same for every user and every document. A cartridge is a KV cache that we train ahead of time instead of computing on the spot. Because the cache sits outside the weights, we can train it without changing the model.

A cartridge starts as a copy of the KV cache for the first sixth of the document. From there, the model writes its own training material by quizzing itself on each piece of the document, typically producing around 800 practice questions and answers. We then adjust only the cartridge, in 2,000 small steps, until the model answers those questions from it the same way it would with that piece of the document in front of it. The original Cartridges paper calls this method self-study because the model writes its own study material, and other groups have since tried variations that we don’t cover in this blog. The diagram below shows how a document moves through the training process.

Figure 1: Training process for one document.

To score a cartridge, we had the model write 50 factual questions per document with the full text in front of it. Each question has a short answer quoted from the document, like a dollar figure, a date, or a party’s name. Then we had it answer the questions three ways: with the full document, with only the first sixth of the document, and with the cartridge. The first sixth takes up the same space as the cartridge, so it shows what that much memory gets you without training, and the full document shows the best case. The headline number, which we call “recovered,” is the share of the gap between those two scores that the cartridge closes. A score of 0% means no better than the first sixth, and 100% means as good as the full document.

Figure 2: Results using a cartridge compared with using only the document’s first sixth.

When do cartridges pay off, and when do they not?

An enterprise considering cartridges needs to know three things: how much of the document the notes keep, what they save at serving time, and what they cannot do.

Prose documents keep most of the cartridge benefits. Across the 53 prose documents, cartridges recovered about 82% on average, which means they kept about four-fifths of the benefit of having the full document. Across the 20 dense numeric documents, they recovered about 64%.

The gap comes from what each kind of document contains. A memo has structure that can be condensed, so a sixth of the space holds most of what matters. A page of numbers has little to condense, and the best summary of a balance sheet is close to the balance sheet itself.

We tried two ways to close the gap. First, on 10 dense-table documents, we doubled the cartridge to one-third of the document. Accuracy rose, but giving the model the first third of the raw table improved it even more. Second, we changed how we train the cartridge, with four variations at the same size. None moved the score by more than about one question in 50, which is no more than rerunning the same training. So the size of the cartridge matters here, while the training method doesn’t.

Figure 3: Comparison of cartridge performance across document types and AI models.

The memory savings are real. The KV cache each conversation holds dropped from 321MB to 54MB, a 6X reduction that matches the compression. Total memory per conversation dropped by only about 2X, from 479MB to 211MB because Qwen3.8 is a hybrid model. Most of its layers keep a fixed-size running summary of about 155MB per conversation, and a cartridge doesn’t shrink that part. A model with full attention in every layer has no such fixed cost, so it would see the full 6X.

Figure 4: Per-conversation GPU memory for Qwen3.8-27B, comparing attention caches from the document and cartridge.

A cartridge is faster than rereading the document. When compared to rereading, the wait for the first word of an answer (time to first token, or TTFT) fell from 1,413ms on average to 125ms, about 11X faster. The gap grows with document length, up to 30X on our longest document, because rereading takes longer the longer the document is, while a cartridge only has to read the question. These comparisons are versus a cold prefill reading of the document.

Total response time improved too. Our test answers averaged about eight tokens, and they finished in 769 milliseconds with a cartridge, compared with 2,026 for a reread, 2.7X sooner on average and between 1.1X and 6.5X depending on the document. On the longest document (about 12,900 tokens), the total dropped from 4.4 seconds to 0.84 seconds, about 5X. The advantage shrinks as answers get longer because the saved reading time is a fixed amount and generating the answer takes up more of the total.

Figure 5: Time to first token by document length for Qwen3.8-27B, comparing full-document processing, prefix caching, and cartridge processing.

The same recipe kept less on Gemma 4 and Muse Glimmer

We repeated the study on two other models of roughly the same size, Google’s Gemma 4 31B and Muse Glimmer 30B, and scored all three on the same 50 questions per document. Gemma recovered 61.1% and Muse recovered 61.3%, compared with 76.4% for Qwen. With the full document in the prompt, all three answered about 48 of 50 questions. Every model reads the documents equally well, so the gap is in how much of the document the cartridge learned.

Most of that gap traces back to how each model pays attention. A model is a stack of layers (Qwen has 64, Muse has 52, and Gemma has 60), and in each layer, it looks back over the text it has already read to decide what matters for the next word. That looking back is called “attention,” and the layers differ in how far back they can look. A full-attention layer can look back at every earlier token, including the cartridge. A sliding-window layer only looks at the most recent 1,000 or 2,000 tokens (roughly 750 to 1,500 words). A linear-attention layer doesn’t look back at individual tokens at all and keeps a fixed-size running summary instead.

That difference decides what a cartridge can do. A cartridge is a KV cache, and only full-attention layers can read one. Sliding-window layers never see it, and linear-attention layers have no cache to look into. So the full-attention layers are the only path by which the document reaches the answer.

How many layers can read the cartridge varies by model. Qwen has 16 full-attention layers out of 64 (the rest are linear attention), or one in four. Muse has 13 of 52, also one in four, and Gemma has 10 of 60, or one in six (the remaining layers in both models are sliding window). Gemma’s cartridge therefore reaches the answer through the fewest layers.

Model designers choose how many numbers each layer saves per token, and models built to be cheap to serve save fewer, which leaves less room for a cartridge to hold the document knowledge.

What should enterprises do before building cartridges?

Cartridges are worth building for prose documents that your agents reread often and that rarely change (e.g., contracts, policies, briefs, and board decks). On those, a cartridge one-sixth the size of the document kept about 82% of the benefit of having the whole document in the prompt, and answers started about 11X sooner than when the model reread the document. Cartridges don’t replace retrieval. An amended document needs a new cartridge, so documents that change often or questions that span several documents still belong in context or in retrieval.

Treat the model as a variable. Qwen, Gemma, and Muse answered about equally well with the full document in the prompt, yet their cartridges kept between 60% and 76% of the benefit because each model’s attention layers decide how much of a cartridge reaches the answer. A cartridge also works only with the model it was trained on, so the same test applies before every model change. Run the same recipe on a few candidate models and score each one on your own questions.

Start with observability. Log which documents your agents reread most, how often those documents change, and which questions people ask about them. That log gives you a shortlist of documents worth a cartridge, and a set of real questions to train and score them on. Without it, you’re guessing which documents to build.

A cartridge is still a KV cache, so it needs a place to live and a way to reach the GPU. Pure Key-Value Accelerator (KVA) is the mechanism for injecting cartridges into a running model, and FlashBlade® is ready to store the files. The same log that picks your cartridges also tells you which caches to store and serve with Pure KVA today. Start logging this month, so that when your next model ships, you already know which cartridges to build.

← All articles

What this article says

More in Hardware & Electronics

All →
L3Harris to Host Investor Site Visit and Webcast
L3Harris

L3Harris to Host Investor Site Visit and Webcast

What Your Black Friday Change Freeze Says About Your Databases
Pure Storage

What Your Black Friday Change Freeze Says About Your Databases

Quelle est la meilleure sonnette connectée pour sécuriser son entrée ?
TP-Link

Quelle est la meilleure sonnette connectée pour sécuriser son entrée ?

Archer BN800 vs BE800 : quel routeur WiFi choisir ?
TP-Link

Archer BN800 vs BE800 : quel routeur WiFi choisir ?

Razer Bundles to Upgrade Your PC Gaming Setup This Cyber Weekend
Razer

Razer Bundles to Upgrade Your PC Gaming Setup This Cyber Weekend

Your Cyber Weekend Wishlist: Gaming and Streaming Gifts for Your Favorite Creator
Razer

Your Cyber Weekend Wishlist: Gaming and Streaming Gifts for Your Favorite Creator

More from Pure Storage

What Your Black Friday Change Freeze Says About Your Databases
Pure Storage

What Your Black Friday Change Freeze Says About Your Databases

Who’s Responsible When AI Goes Wrong?
Pure Storage

Who’s Responsible When AI Goes Wrong?

Great CX Is Built around the Customer
Pure Storage

Great CX Is Built around the Customer

What Oracle Infrastructure Teams Should Prepare before AI Agents Arrive
Pure Storage

What Oracle Infrastructure Teams Should Prepare before AI Agents Arrive

The Hidden Cost of Slow Data in Quant Research
Pure Storage

The Hidden Cost of Slow Data in Quant Research

Your Coding Agent Is a Generalist. Here’s How to Make It a Cheaper Specialist
Pure Storage

Your Coding Agent Is a Generalist. Here’s How to Make It a Cheaper Specialist