the engine

Context engineering optimizes the data you have. The hard half is the data you need.

Every serious team is investing in context engineering — getting the right information into a model's limited working memory at the moment it answers. It matters, and we do it too. But it presumes the data you have is the data you need. For long-horizon planning, that presumption is false. Wubs is built around the other half of the problem: a persistent specification of what a safe answer requires — including the facts that don't exist yet.

why health breaks the default approach

A care plan is the canonical long-horizon problem.

It unfolds over weeks and months, across visits, labs, and behavior change. Two facts about language models collide here:

Fact one

Effective context is far smaller than the advertised window.

And it degrades as you stuff it with marginally-relevant material. This is the "lost in the middle" effect (Liu et al., TACL 2024): accuracy is highest at the very start and end of the context and sags in the middle, even in models built for long context. NoLiMa (ICML 2025), which removes lexical shortcuts and forces latent association — the kind of recall longitudinal health reasoning actually requires — saw eleven of thirteen leading long-context models fall below half their short-context accuracy at just 32K tokens. RULER (NVIDIA, 2024) shows the same gap between advertised and effective context across the board. Anthropic frames the honest shape as "a performance gradient rather than a hard cliff" — and prescribes the alternative directly: distill and structure context rather than hoard it.

Fact two

The information a safe answer depends on is routinely not yet in the system.

The lab hasn't come back. The specialist visit hasn't happened. The patient never mentioned the over-the-counter supplement that changes the whole picture. You cannot retrieve your way to a fact that doesn't exist yet.

Every existing system handles this the same unsafe way: it draws the boundary of "context" at the edge of whatever data it happens to hold, then answers fluently inside that boundary — in the same confident register whether it's working from the full picture or a sliver. The shortfall is invisible in the output. An answer built from a fraction of the decision-relevant facts does not look incomplete.

You cannot solve a person's health by pasting their life into a prompt.

the context envelope

A first-class object for the data you need.

Where context engineering manages the data you have, the context envelope manages the data you need. It is a persistent, evolving specification — derived from the patient's goal and plan — of the full set of facts a safe answer would require, independent of which of those facts we currently possess.

This builds on an established line of work — context-sufficiency and answerability detection (Joren et al., Sufficient Context, ICLR 2025) and selective prediction / abstention — which asks whether the context in hand is enough to answer, and declines when it isn't. Wubs takes that question — do we have what a safe answer needs? — and makes its answer an explicit, persistent object the plan maintains over time.

Every fact the envelope tracks carries a small set of typed attributes:

  • required vs. enhancing — is this fact load-bearing (its absence should stop us answering confidently), or does it merely improve the answer?
  • relevance — weighted to this specific goal and plan activity.
  • acquisition state — present, missing, pending, or previously attempted and failed.
  • provenance and confidence — where a present value came from and how much to trust it, with a freshness window after which it goes stale.
  • expected arrival — for anything we don't yet hold: where we expect it to come from, when we expect it to land, and when it would be considered overdue.
facts that don't exist yet

Modeling not-yet-existing data as a first-class property of a knowledge gap.

Sufficiency and abstention methods reason over facts that exist somewhere — a context window, a corpus, a database — and stop at a binary: is there enough to answer, or not? A care plan breaks that frame. It is full of facts that don't exist yet but are coming — the A1c due in three weeks, the cardiology note from next month's visit, tonight's wearable sync, the rhythm strip a dependent step is waiting on. Representing a fact that does not exist yet, and gating a decision on its arrival, is the part the standard approach does not address — and the part long-horizon care depends on. It buys three behaviors that retrieve-and-abstain structurally cannot produce:

One

Directed acquisition.

Wubs asks for, and invites you to connect, exactly what the goal requires — ranked by relevance — rather than whatever is textually similar to your last message. It never fishes for data it has no use for, and every ask is justified by an active goal or plan element. Acquisition is directed against a spec, not triggered by a query.

Two

Expected-arrival-aware handling.

If a missing fact is imminent, Wubs waits for it instead of guessing. If a source has failed before, it remembers and routes around it — it won't keep bottlenecking you on the portal that wouldn't connect. If something is overdue, it surfaces that.

Three

Calibrated deferral.

At answer time, Wubs checks whether the load-bearing facts for this question are actually present and confident. If a load-bearing fact is absent, it bounds, defers, or elicits — rather than emitting a confident answer over a hole. The envelope, not the token window, is what bounds a safe answer.

And it draws one more distinction the plan depends on: a missing measurement (a lab, a reading) is something to acquire; a missing clinical judgment is not Wubs's to make — it is routed to the clinician, and the dependent step waits for their call. The envelope types the gap, so the system knows which gaps it can close itself and which it must hand off.

slow clock, fast clock

Heavy reasoning offline. Small assembly at answer time.

The expensive work — matching new data to the envelope, revising the plan, re-deriving the spec — runs on a recurring offline pass that distills accumulated data and dialogue into compact, structured state. Answer-time assembly reads that distilled state. This keeps the moment of answering small and avoids the degradation that comes from assembling large, unstructured context at inference time. It's the architectural reason a long-horizon plan stays coherent over months without dragging the whole history into every turn.

Factual spinevitals · labs · meds · notes, each with provenance + time
FHIR · scan · chat
Motivational layerCOM-B: capability · opportunity · motivation · beliefs
Working plangoals → the behaviours each requires → what each needs
Pattern librarywhich behavioural-science move fits which situation
🌙 Agentic distillation (slow clock)decide what's worth remembering, reconcile, update the model
⚡ Retrieval by meaning (fast clock)surface only what's relevant, weighted by confidence, recency, consequence

Kind-separated memory so the system reasons over understanding, not transcripts — distilled on a slower clock and retrieved by meaning.

what it measures out to

We benchmarked it. Distilling the plan's context is what buys the efficiency; the envelope is what keeps it complete.

We ran a blind, pre-registered internal benchmark on synthetic long-horizon journeys: one strong model held constant, only the context it was handed varied, scored by a separate model that never saw which method produced which answer. It reproduces the two failure modes above — the wasteful full dump, and the retrieval that quietly drops the fact that mattered — and lets us separate what distillation earns from what the envelope earns.

~8×
Fewer answer-time tokens

A compact, distilled context matched feeding the model the entire history on answer quality — at roughly an eighth of the tokens. Distilling, not hoarding, is table-stakes context engineering; we just do it against the plan.

100%
Load-bearing facts carried

The goal-derived context carried every deciding fact. Naive semantic retrieval carried just 53% — and only 17% on the checkpoints waiting on future data — at comparable cost.

$0
Marginal cost to resume

Deciding whether an arrival resumes a pending decision is a deterministic match for us — no model call. Every retrieval-based approach pays a model call on every arrival, including the irrelevant majority.

Load-bearing-fact coverage, by how the model was given its context
Full-history dumpeverything, every turn
100% carried
Naive semantic retrievaltop matches to the question
53%
Goal-derived context (Wubs)distilled against the plan
100% carried

Relative answer-time cost: the full dump ≈ the goal-derived context; naive retrieval ≈ 1.1× (comparable). The dump is complete but wasteful; naive retrieval is lean but lossy — it drops distributed trends and facts a decision is still waiting on. The goal-derived context is lean and complete.

Why the standard ways of feeding context break here

ApproachThe ideaWhere it breaks for long-horizon care
Full-history dumpPut the whole record in the prompt each turn.Pays for a huge context every call, and accuracy sags in the middle of it — the more you hoard, the worse recall of the fact that mattered.
Naive semantic retrievalFetch what's most similar to the question.Drops load-bearing facts that aren't lexically similar — a distributed trend, a negative finding, a value the plan is waiting on. It never fabricates; the answer just quietly stalls on a hole.
Agentic / reranked retrievalPlan → retrieve → rerank → synthesize, per query.Several model calls per arrival — costlier — and still cannot retrieve a fact that does not exist yet. Sophistication doesn't touch the anticipation problem.
Goal-derived context (Wubs)Distill against the plan; hold slots for facts not yet in hand.Carries the load-bearing facts at retrieval-like cost, and — uniquely — represents data that doesn't exist yet, so a decision can wait for it and resume the moment it lands.

The part that recurs forever: the per-arrival checkpoint

Every other approach answers the recurring “did this arrival resume a pending decision?” question with a strong-model call — on every incoming reading, most of which resume nothing. Deterministic matching against the envelope answers it for free. Modeled at a strong model's rates on a moderate data cadence:

Per-arrival checkpointEst. $ / patient / yrAt 100k patientsAt 1M patients
Raw-history dump per arrival~$28~$2.8M~$28M
Agentic retrieval (~2.5 calls)~$23~$2.3M~$23M
Distilled single call~$4~$0.4M~$4M
Goal-derived envelope (Wubs)$0$0$0

And the resume-or-route decision itself is deterministic and error-free in our tests100% (40 of 40) on the structural “acquire this, or route it to the clinician” call, with zero over-routing — against 77.5% for an Opus-class model asked to make the same structural decision. A strong model reasons well when it's handed the right facts; the leverage is in deciding, deterministically and for free, which facts a decision is still waiting on — the part retrieval and distillation, by construction, work backward over data that already exists and cannot do.

Figures are from an internal, pre-registered benchmark on synthetic long-horizon journeys (zero patient data), blind-judged by a separate model; directional at this scale, not a clinical claim. “Naive semantic retrieval” is a real embedding model at a context budget matched to ours — not a strawman; we make no claim against agentic or reranked retrieval at fetching an existing fact. Token counts use a standard subword tokenizer; dollar figures are modeled estimates at published model rates and a stated data cadence, shown as ranges. The context envelope's expected-arrival gap modeling is the subject of a pending U.S. patent application.

filling the envelope from anywhere

A spec is only useful if you can fill it — from messy, disagreeing sources.

The envelope is filled by a reconciliation layer that normalizes coded EHR resources, high-frequency wearable telemetry, a typed self-report, and a photographed printout onto one structured health spine — where every fact carries its source, a timestamp, a confidence appropriate to how it was obtained, and a freshness window after which it goes stale. This is the now-standard memory discipline — tag every fact with provenance, confidence, and recency — applied with a clinical ontology and clinical-grade reconciliation rules. Two things about health make that discipline load-bearing rather than cosmetic:

  • Facts have clinical lifecycles. A potassium value is authoritative for days and stale in a month; a stated medication is durable; a cuff reading at home is not a clinic measurement. The system models validity over time, per fact — not just recency — so a value is trusted exactly as long as it should be, and superseded or revised when a more authoritative source contradicts it.
  • The patient's own report is a first-class source. The night shift that wrecks the morning dose, the fear of a side effect, the belief that a medication is optional — behavioral and motivational facts live in no database, carry their own provenance and confidence, and are exactly what a plan succeeds or fails on. Wubs treats them as a typed modality alongside the clinical and sensor data, not as free-text exhaust.

And even a single source is messy. The assumption that a standardized FHIR API means clean clinical context is wrong — the API is the easy part. Our pipeline is deterministic-first, with AI reserved for precisely the residual where meaning is genuinely ambiguous: rule-based crosswalks and de-duplication at near-zero cost for everything structured, and a safety-gated model only on the genuinely unique clinical narrative, held to a measured faithfulness bar before anything touches the record. (We go deep on this for a clinical-leadership audience on the For Health Systems page.)

an instrument produces a number

An instrument produces a number. The plan is what makes it matter.

Health signals arrive from a widening range of instruments — consumer wearables, home cuffs and meters, and a growing class of regulated, cleared devices that produce clinically validated measurements. They share one problem: a measurement is only as valuable as the context it lands in. A cleared rhythm reading, a continuous glucose trace, a validated blood-pressure series — each is authoritative for exactly what it measures, and each, on its own, is a number without a plan.

Wubs ingests any connected signal into the same provenance-, confidence-, and lifecycle-typed spine. A regulated device's output is carried with its provenance and a confidence that reflects how it was obtained, treated as authoritative for precisely what it measures, and never re-derived or second-guessed — Wubs does not re-interpret a cleared instrument's clinical output; it puts it to work. And because the envelope is already holding slots open for the facts a plan needs, a device's reading frequently arrives as the exact fact a dependent step was waiting on — the rhythm confirmation before a medication change is weighed, the glucose pattern a plan was watching for, the blood-pressure trend a goal was tracking toward.

This is the same architecture, not a special case: clinical resources, wearable telemetry, self-report, and cleared-device output all reconcile onto one spine — each trusted exactly as much, and exactly as long, as its source warrants. The instrument measures; the plan is what turns the measurement into a next step.

safety is a property of the architecture

Surface and reason. Never fabricate, never decide, never auto-send.

  • The envelope gates the answer. A load-bearing gap means Wubs defers or elicits — it does not answer confidently over a hole.
  • AI on clinical content ships behind a blocking evaluation gate on faithfulness, transcode precision, and schema validity. AI on health data is held to a measured bar, not trusted blindly.
  • Informational, never prescriptive. Wubs never asserts a diagnosis or changes a medication; it attributes clinical judgment to clinicians, cited guidance, or the patient's own stated goal.
  • Every data ask is justified by an active goal or plan element, in plain language — a direct consequence of envelope-driven elicitation.

Wubs sits, by construction, on the planning side of the line. The measurement a regulated device is cleared to make, and the judgment a clinician is licensed to render, are theirs. Wubs organizes the evidence around them, names what is missing, routes the judgment to the clinician, and holds the dependent step open until it lands. It is built to extend those tools and stay aligned with them — never to replace them, re-derive what they produce, or decide in their place.

references
  • Liu et al. (2024). Lost in the Middle: How Language Models Use Long Contexts. TACL 12.
  • Hsieh et al. (2024). RULER: What's the Real Context Size of Your Long-Context Language Models? (NVIDIA / COLM).
  • Modarressi et al. (2025). NoLiMa: Long-Context Evaluation Beyond Literal Matching. (ICML).
  • Anthropic (2025). Effective context engineering for AI agents.
  • Joren et al. (2025). Sufficient Context: A New Lens on Retrieval-Augmented Generation. (ICLR).
  • El-Yaniv & Wiener (2010). On the Foundations of Noise-Free Selective Classification. JMLR 11.
  • Kamath et al. (2020). Selective Question Answering under Domain Shift. (ACL).
  • Asai et al. (2024). Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection. (ICLR).
  • Mozannar & Sontag (2020). Consistent Estimators for Learning to Defer to an Expert. (ICML).
  • Dong et al. (2014). Knowledge Vault: A Web-Scale Approach to Probabilistic Knowledge Fusion. (KDD).

The envelope is the throughline: it decides what a safe answer needs, goes after what's missing, knows the difference between a fact to fetch and a judgment to defer, and holds the decision open until the picture is complete.