By Anant MishraDesign study
An offline Python replay prices four designs and checks 12,001 reread lengths using invented rates. The question and answer key are supplied for future testing. Quality and service performance are unmeasured.
Design feature 01
4 fictional designs
Design feature 02
12,001 reread lengths
Design feature 03
1 unscored answer key
Executive Summary
A Design study prices four ways to handle a fictional manual. Replay the cost of extracts, a final answer and rereading original evidence.
Architectural Deep Dive
Design study. A fictional maintenance manual has a general inspection rule in one half and an exception table in the other. A reader wants one interval for one piece of equipment, with the passages that establish it. Splitting the manual looks attractive on a price sheet. The engineering decision turns on what the service must read again to return that answer.
This is an offline cost comparison. The manual, token budgets and prices are invented. A Python replay prices each call and varies the amount of source material reread during the final answer. It makes no model calls. The study includes a question and answer key for a future evaluation. The short sample passages illustrate the task, while the assigned lengths represent a much larger fictional manual.
Give the answer a test
Section A3 in the fixture assigns Group R portable pumps an annual inspection unless the conditions in Table 4 apply. Section B4 contains that table and assigns a 90-day interval to Group R pumps operated in salt water. For a pump used in salt water, an acceptable answer must say every 90 days and point the reviewer to both A3 and B4. This instruction belongs only to the fictional manual.
A reader given two unconnected extracts still has to resolve the exception. Giving the whole manual to one call makes both passages available, although the answer could still miss one. Google’s long-context guide discusses how results can vary when a task depends on several pieces of information. That is why the test asks for the governing rule, the exception and their relationship. A word match on “90” would accept an answer with the wrong scope.
Write down the calls before pricing the options
Each half of the manual contains 6,000 assumed source tokens. Each call adds 500 tokens of instructions. A part-level extract uses 400 output tokens, and a final answer has a budget of 1,000. If the final call receives the two extracts, their 800 output tokens become input tokens on that call. Source text sent again is charged again in this uncached example.
The fictional ordinary rates are $2 per million input tokens and $8 per million output tokens. A call above 10,000 input tokens uses $4 and $12 for its entire input and output. The threshold and amounts are study parameters. Google’s Gemini API pricing tables supply a real example of model-specific input and output rates that depend on prompt length.
| Design | Calls | Total US cents |
|---|---|---|
| Whole manual, one answer | 1 | 6.20 |
| Two extracts only | 2 | 3.24 |
| Two extracts, then one answer | 3 | 4.30 |
| Two extracts, then reread the full manual for one answer | 3 | 9.76 |
The whole-manual call has 12,500 input tokens and 1,000 output tokens. Its long-band input costs five cents and its output costs 1.20 cents. Each extraction call has 6,500 input and 400 output tokens at ordinary rates, or 1.62 cents. The least expensive row buys two intermediate documents. It leaves the reader’s question open.
Find the point where rereading changes the decision
Joining the two extracts starts the final prompt at 1,300 tokens, including instructions. With 1,000 output tokens, that call costs 1.06 cents. Add the two extraction calls and the design comes to 4.30 cents. A reviewer might reasonably ask for original passages beside the extracts so the answering model can check a footnote or table heading. Those extra input tokens change the comparison.
The replay tries every integer reread length from zero through all 12,000 source tokens. At 8,700 reread tokens, the final prompt contains exactly 10,000 tokens. The three calls cost 6.04 cents, still below the 6.20-cent whole-manual call. At 8,701, the final call enters the long band. Its own charge becomes 5.2004 cents, bringing the three-call total to 8.4404 cents. A full reread costs 9.76 cents across the three calls. These are calculated charges before rounding to invoice units.
This gives the operator a specific question to bring to a document review. Can the service reliably select enough original evidence within that reread budget? If the answer depends on tables with detached headings or amendments stored well after the original rule, include those documents in the evaluation sample. A cheap join that drops the exception has bought a different result.
Reproduce the bill, then test the answer
Download the inputs and fictional answer key, Python replay and execution record into one folder. Run python3 replay.py --check. The reproduction notes explain the units and scope. Each recorded call shows its input, output, price band and charge in millionths of a US dollar. The saved source hashes let a reviewer identify the exact calculation.
For a field test, fix the manual revision and give each design the same question. Retain the exact passages available to the final call, the answer, its references and the metered usage. Have a reviewer score the interval and both references before seeing cost. Keep incorrect and incomplete answers in the results, along with retries and review time. Restricted manuals require an approved processing location for extraction, assembly and review. Nothing in the replay estimates latency, validates answer quality or establishes an acceptable deployment location.
The guide to whole-request pricing shows why average prompt length can hide this change. Once a team has measured the mix of qualifying tasks and price bands, the monthly inference calculator can put their observed token usage on a common USD basis.
Proposed approach
- Method
- Whole-request pricing in integer microdollars
- Materials
- Python replay, JSON fixture, answer key and execution record
Sources
- Long context and multiple pieces of information — Google · checked 6 December 2026
- Gemini API pricing by model and prompt length — Google · checked 6 December 2026
Related reading
Read the publishing standards or suggest a correction.