The Extractor Should Run Before the Agent
Most agent pipelines ask a general language model to do three jobs at once: read messy input, turn it into structured data, and decide what happens next.
Cloudflare’s Clairic preview argues that the first job deserves its own model class. Clairic is a System One extraction model that returns typed values, spans, confidence scores, estimates, and forecasts without generating an answer token by token.
The important shift is not another model name. It is a new boundary in the control loop: extract facts first, decide second, act last.
Extraction is not generation
Cloudflare describes Clairic as a model for extracting, computing, estimating, and forecasting values from unstructured inputs. It is hosted on Workers AI as @cf/cloudflare/clairic, with open weights planned for a future release.
The model accepts a text state, optional images, and a map of typed fields. A field can ask for a text span, number, date, duration, list, estimate, or forecast. The output is shaped by that type rather than emitted as free-form prose.
That sounds like a small API distinction. It is actually a control decision.
An LLM asked to return JSON still generates a string that another part of the system must parse and validate. Clairic’s output is designed to be a value of the declared type, or null when the model cannot find a suitable answer. Extracted text can include character offsets, so the system can point back to the source instead of trusting a paraphrase.
Cloudflare’s example turns a support email into an order ID, delivery date, total amount, elapsed duration, damage list, and a missing tracking number. The amount and duration are computed from facts in the email. The missing tracking number returns null instead of a plausible value.
That is a better primitive for an agent than a beautifully formatted hallucination.
The model split is the architecture
Cloudflare places Clairic beside its decision model, Clef, and general language models. The roles are distinct:
| System One extraction | Typed values, spans, distributions, and forecasts. Best for reading messy input and creating bounded facts. | | System One decision | Choices with probabilities. Best for selecting among known actions or categories. | | System Two language model | Generated text and reasoning. Best for explaining, planning, calling tools, and handling open-ended work. |
The usual agent stack collapses these layers into one expensive call. The model reads an invoice, decides whether it is legitimate, drafts a response, and perhaps calls a payment tool. Every step inherits the weaknesses of generation, even when the task is just addition, date arithmetic, or finding a name in text.
A typed extraction step narrows the trust boundary before the agent starts reasoning.
raw email, document, or image
|
v
typed extraction model
|
v
facts, spans, confidence
|
v
decision model or policy
|
v
language model agent
|
v
tool call or response
The verifier gets a cleaner object to inspect. The language model gets less irrelevant text. The operator gets a trace that can distinguish a source span from a generated explanation.
Confidence is a routing signal, not a guarantee
Clairic returns confidence and a probability that a value is null. For estimates, it returns a median and an 80 percent interval. For forecasts, it returns an interval for each future step.
Those fields are useful because they let the harness choose a next action. A high-confidence order number can move through an automated path. A missing value or a wide interval can trigger a second extraction pass, a deterministic lookup, or human review.
The uncomfortable truth is that confidence does not make the model correct. It makes uncertainty representable.
That difference matters. A single generated number forces the next component to guess whether it is reliable. A typed estimate with an interval gives the policy layer something explicit to evaluate. The system can define a threshold, a fallback, and an audit event instead of hiding the decision in a prompt.
The control logic might look like this:
extract value and confidence
|
+ value is null or interval is wide, review or second check
+ value is bounded and confidence passes policy, decide
+ act
This is not a safety guarantee. It is a place to put one.
The cost claim is about the whole pipeline
Cloudflare says Clairic processes input in a single forward pass, produces no output tokens, and typically responds in under a second. It also says multiple fields can be answered in parallel and that the hosted model is faster, cheaper, and more accurate for particular extraction workloads than a general LLM.
Those are vendor claims, not an independent benchmark from this site. They are still useful as an architectural hypothesis.
If extraction is a separate model call, it adds a component. If it removes retries, JSON repair, schema validation, and repeated prompts from a larger model, it may reduce the total work. The correct measurement is not extraction latency in isolation. It is successful workflow completion:
- wall clock time from input to verified action
- cost per accepted record, including retries
- null and low-confidence rates
- field accuracy by type
- source-span coverage
- number of escalations to a larger model or human
- downstream tool-call errors
A cheap extractor that sends bad facts into a fast decision model is not an optimization. It is a faster way to reach the wrong branch.
The boundary around estimates matters
Extraction and computation are straightforward to reason about. Estimation and forecasting are more consequential because the answer is not explicitly present in the input.
Cloudflare’s examples declare bounds, a step size, and sometimes a linear or logarithmic scale. Clairic returns a distribution inside the declared range. That makes the output easier to route, but it also moves responsibility to the caller.
A bound is not evidence. It is a policy choice.
If an agent asks for a repair-cost estimate between 10 and 5,000 dollars, the model cannot return a value outside that range. The application still needs to decide whether the range is appropriate, whether the input contains enough evidence, and whether the estimate can authorize a payment or only prioritize a queue.
The same applies to forecasts. Cloudflare reports a 21-day TSA forecasting experiment with a 3.3 percent average error and 17 of 21 actual counts inside the 80 percent interval. It also reports that three of the four misses outside the interval occurred over a holiday weekend, an event not represented in the historical series.
That is exactly the kind of limitation an operator needs to see. The interval expresses uncertainty in the observed pattern. It does not know about surprises absent from the input.
Why this matters for agents
The agent should not be the first component to touch every document.
A general model is good at resolving ambiguity, explaining tradeoffs, and choosing among tools. It is a poor default parser for fields that have a known type, a known source location, or a bounded range. Asking it to do all of those jobs makes the control loop harder to verify.
The practical design is a routed stack:
- Use extraction for values that can be typed or traced to input spans.
- Use deterministic code for arithmetic, normalization, and policy checks where possible.
- Use a decision model for a finite action choice.
- Use a language model when the task needs explanation, planning, or open-ended reasoning.
- Require approval or a stronger verifier before an external side effect.
This is model routing in the useful sense. It is not choosing a winner on a leaderboard. It is assigning each part of the control loop the narrowest model that can do it and exposing the uncertainty needed for the next part.
What operators should test
Clairic is currently a preview, and Cloudflare says open weights are coming. An operator evaluating it should keep the test narrow and reproducible.
Use a fixed corpus with representative documents and images. Record the exact field schema, bounds, model identifier, runtime, and response. Compare it with the existing LLM extraction path on both clean and adversarial inputs.
Measure whether the new boundary improves the full workflow, not just the first response. Include malformed dates, missing fields, conflicting totals, ambiguous names, image quality changes, and inputs designed to make a model overconfident.
For a security-sensitive agent, keep the trust boundary explicit. A confidence score can route a review. It should not grant shell access, approve a transfer, or widen permissions by itself.
The extractor comes before the agent
The first model in an agent pipeline does not need to be the most capable one. It needs to produce an output the next component can inspect.
Clairic’s preview makes that idea concrete: typed extraction, bounded estimates, source spans, nulls, and intervals before decisions and language generation.
The future agent stack may contain more models, not fewer. That is not needless complexity when each model has a narrower contract and a verifier can inspect the boundary between them.
The model should not be asked to be the parser, judge, planner, and operator in one pass. Extract first. Decide second. Act only when the boundary holds.
Sources
- Cloudflare, Introducing Clairic, a new System One class of extraction models, October 19, 2026. The model classes, typed fields, confidence outputs, examples, and forecasting results are attributed to this announcement.
- Cloudflare Workers AI Clairic documentation, accessed October 21, 2026.
- Kevin Flansburg’s Clairic announcement on X, October 19, 2026. The announcement and open-weights timing are attributed to this post.