Quanta

← Back to Briefings

High-Volume Document Teams: Put the Question Last

Cost at volumeEN7 reads

A team asking hundreds of questions about the same contract should not treat every request as a completely new document-processing job. Prompt caching can reduce the cost of repeatedly supplying that contract, but only when the request layout preserves reusable content. The practical starting point is simple: put stable material first and changing questions last.

This walkthrough assumes repeated requests against an unchanged document. Savings depend on the selected model, its caching rules, and whether later requests actually hit the cache. A tidy prompt alone does not guarantee a discount.

01 · Step 1: Identify the Document Worth Reusing

Choose a workflow with a large shared input and frequent follow-up requests: contract review, policy checks, support-manual analysis, or technical specification queries. Group requests by document version and model configuration so you can measure genuine reuse.

Record a baseline before changing anything. Capture input tokens, output tokens, reported cache usage, total billed cost, and response quality. Compare equivalent tasks; shorter answers can make a run cheaper without any improvement in caching.

02 · Step 2: Confirm the Selected Model's Cache Rules

Do not assume every model caches the same way. For a candidate such as Claude Sonnet 5.5 or Gemini 3.1 Pro, check the caching behavior exposed by the actual route and interface you use. Minimum eligible lengths, retention periods, cache boundaries, and explicit configuration requirements can differ.

Also establish the scope of reuse. A cache entry may depend on the model, account context, request settings, or other provider-specific conditions. Do not budget for reuse across different models or assume that a compatible SDK makes cache controls interchangeable.

03 · Step 3: Build a Stable Prefix and a Variable Tail

Arrange the request so that the reusable beginning contains everything that genuinely stays fixed. Keep it identical across repeated calls, including message ordering and document serialization. Where the interface requires an explicit cache boundary, place it according to that interface's rules.

  • › First: fixed system instructions and stable tool definitions, where applicable.
  • › Next: the unchanged document, with a stable document identifier and version.
  • › Then: any reusable rubric or output requirements that belong in the cached region.
  • › Last: the current question, request-specific context, and changing metadata.

For example, keep the review policy and contract together at the front, then append a question about termination provisions. The next request can ask about payment obligations without rebuilding the shared beginning. Keep changing conversation history outside the intended reusable region.

04 · Step 4: Remove Accidental Prefix Changes

Inspect the request your application actually sends, not just the prompt template. A timestamp inserted before the document can disrupt reuse even when the document itself is unchanged. Random identifiers, reordered fields, shifting whitespace, and inconsistent extraction output can have the same effect.

Use deterministic document preparation and serialization. Store a content fingerprint internally to detect changes, but remember that a fingerprint does not replace document text unless the interface explicitly supports referencing stored content. Never sacrifice required access controls or tenant isolation to improve cache hits.

05 · Step 5: Price the First Write and Later Reads

Separate cache creation from reuse. Quanta meters real tokens, with cache writes and cache reads priced separately. Evaluate a batch using the applicable charges for uncached input, cache writes, cache reads, and output. Check how usage fields are defined so that overlapping token counts are not billed twice in your calculation.

A first request can cost more than a later cache hit. Whether the batch saves money depends on the write cost, read discount, document size, and number of successful reuses before expiration. Use current rates and observed usage instead of assuming a universal break-even point.

06 · Step 6: Roll Out Against Total Workflow Cost

Test a cold request, an identical-prefix repeat, a changed question, and a changed document. Verify reported cache usage and answer quality in each case. Then measure a representative batch that includes expiration, retries, and normal document updates.

Quanta fits teams running sustained workloads because one pay-as-you-go balance covers multiple model families. Open a Quanta account to test this layout on a representative document batch. Keep the rollout gated on measured total cost and acceptable results: the goal is cheaper completed work, not merely a higher cache-hit count.