Insights6 April 2026Updated 26 October 20265 min read

Test the extraction pipeline, not the model label

Abstract neon lightning bolts in cyan and magenta against a dark background with glowing reflections below.

For structured extraction, we recommend choosing the pipeline that delivers acceptable records within the required time, rather than choosing a model because its smaller size suggests speed. Treat the model and the runner as separate things to test. A runner is the application code that submits requests, checks responses and saves results.

Our discussion of single-stream benchmarks considers how to evaluate inference capacity. Here we propose a narrower experiment: compare an existing extraction runner with a revised runner, then establish whether changing the model adds anything. This is a test design, not a report of a measured speed-up.

Define an accepted record first

Raw fragments enter a gate of light and only complete, well-formed cubes pass through

We recommend starting with the output contract, before tuning inference settings. For an extraction task, write down the required fields and the evidence each field needs in the input document. Decide how to represent missing information and which inferred fields, if any, are permitted. Keep those decisions fixed across the comparison.

Separate structural checks from checks against the source text. The JSON Schema validation specification describes constraints on the structure of instance data. Our recommendation is to use those checks for the output contract, then assess whether extracted values are supported by the document. Do not treat a structurally valid response as sufficient evidence that the extraction is correct.

For example, in a proposed job-description test, require an explicit qualification to have a matching passage in the input. Score inferred skills separately from skills that the text names. Have reviewers resolve ambiguous examples before comparing models, and keep some labelled records out of tuning. Call a record accepted only when it passes the agreed checks and has been saved successfully.

Make the comparison explainable

We recommend saving a baseline run before rewriting the runner. Use a fixed collection of documents that includes long inputs and difficult cases, not only short examples that already work. Record the input identifiers and preserve the expected outputs under a versioned test definition. Keep private documents out of public benchmark reports.

For the first comparison, hold the model, prompt, hardware and serving configuration fixed. Change the runner alone. Then compare the original model with a candidate model through the revised runner, keeping the acceptance policy unchanged. If a model needs a different prompt or output budget, record that as another configuration rather than calling it a model-only comparison.

We suggest retaining results for each configuration rather than replacing the previous summary with the latest result. Record software versions and launch settings alongside the outputs. Repeat runs, vary their order and identify whether caches start warm or cold. Treat an improvement that appears in one run as a reason to investigate, not as the result to publish.

Measure through to the saved output

A pulse of light travels through a long chain of chambers all the way into a final storage block

For this experiment, we recommend defining useful throughput as unique accepted records divided by the elapsed time for the run. Start the clock before dispatch and stop it after final validation and persistence. Include retries in that interval. Report unfinished or rejected records alongside the throughput figure, so the reader can see what the runner did not complete.

Add timings around queue waiting, model requests, validation and storage. Keep the boundaries explicit when stages overlap, rather than adding overlapping durations into a supposed total. Record individual attempt identifiers under each input identifier. Count the accepted input once even when several attempts were needed.

Use the timings to choose the next change. If requests complete but records wait for storage, investigate the write stage before changing the model. If the queue grows while the server is idle, inspect dispatch and connection handling. These are diagnostic questions for the experiment, not assumptions about where every extraction system is slow.

Treat retries as part of the workload

The AWS Builders' Library explains that retries can increase load on an already overloaded service. It also explains that a timeout does not necessarily mean a remote operation had no side effects. We recommend testing retry delays with a random component, rather than having every failed request try again at the same instant.

We recommend giving transient request failures a bounded retry policy and recording the reason for each retry. Handle invalid output separately. Do not repeatedly resend an unchanged request after a repeatable validation failure without investigating the prompt, contract or input. Set a stopping condition and retain the failed record for inspection.

Choose timeouts from observed request behaviour under the intended load, including time spent waiting, rather than copying an interactive default. Test a timeout deliberately and check what happens to the outstanding request. For storage, use a stable record identifier and an explicit duplicate-handling policy. Verify that restarting the runner cannot turn a retried extraction into a second accepted record.

Let the result choose the change

We recommend testing bounded dispatch levels through the complete runner while keeping the rest of each configuration fixed. Compare accepted throughput with failure rates and completion times. Stop increasing load when the result breaches the limits agreed for the job. Keep the failures visible even if another setting produces an attractive token-generation rate.

Compare extraction quality by field as well as by record. Review the same held-out documents for every candidate, and hide the model identity from reviewers where practical. Include the cost of rejected attempts and any required human correction in the comparison. Do not infer a quality improvement from a few persuasive examples.

Our decision rule is to prefer the configuration that meets the acceptance criteria within the available time and operating budget. Keep the smaller model if it wins that comparison. Keep the existing model if the runner change is sufficient. Choose a larger model only when the measured result justifies it, without assuming that its size guarantees either better quality or worse speed.

Update, October 2026

For related guidance on choosing models within a wider delivery process, see our engineering discussion of routing work by complexity. We recommend keeping the extraction experiment separate from the routing policy, so each proposed model change still has to pass the same acceptance checks.

Sources

Want this in your team?

Tell us what you're building and where you want to get to, and we'll think it through with you.

Let's have a chat Follow by RSS →

All insights →