1–2 · Parse & Formalize
For Both Executive and Technical ReadersNatural language arrives. A typed CausalQuery leaves. Nothing else passes the boundary.
01 What happens
Language in. Structure out. No prose crosses the boundary.
Parse is the first and only LLM step on the inbound path. It runs under a fixed schema, function-calling or constrained decoding, so its output is always a typed object, never free text. It does two things: entity-linking (binding terms in the question to variables in the model registry) and intent extraction (determining which rung the question belongs to).
Formalize is pure code. Given the rung and the bound variables from Parse, the formal estimand is mechanical, no language model involved. Rung 1 yields P(Y | Z). Rung 2 yields P(Y | do(X), Z). Rung 3 yields P(Yx | X=x′, Y=y′).
If a term will not bind or the rung is ambiguous, Parse returns a clarification request. It does not guess. A failed parse never reaches Step 2.
02 In / Out
One natural-language string in. One typed estimand out.
IN Natural-language question (string)
LLM Constrained decode under fixed schema
OUT CausalQuery, typed, versioned, loggable
| Field | Value |
|---|---|
| Rung | 2, interventional |
| Target | Sepsis |
| Intervention | Treatment = empirical |
| Evidence | Septic Appearance (soft, p=0.76), Lactate (hard, gt_4) |
| Scope | icu_adult |
03 The LLM role
Translator, not reasoner. It binds terms. It does not compute.
The LLM at Step 1 is constrained to a schema. It cannot produce prose. Its job is to map the clinician’s words to variables that exist in the model registry. If “lactate came back at 4.1” binds to Lactate = gt_4, that binding is logged and auditable. If it cannot bind, it asks.
This is the only point where natural language enters the deterministic pipeline. After Step 2, everything is typed objects until Step 8 (Narrate).
04 Rung detection
The rung is read from linguistic markers, not inferred.
| Pattern | Rung | Estimand |
|---|---|---|
| “what is the rate of”, “how likely” | 1 | P(Y | Z) |
| “if we set”, “if we do X” | 2 | P(Y | do(X), Z) |
| “would have”, “had we” | 3 | P(Yx | X=x′, Y=y′) |
05 Architecture components
Evidence and Pipeline. Nothing else runs at this step.
Pipeline →, defines the step sequence and the schema Parse operates under.
Evidence →, defines how soft and hard evidence is typed and passed to the model.