1 August 2026 · Hybrid clinical AI

When should an LLM enter a deterministic clinical workflow?

A 30-minute reading pack about Clinical Quality Language, unstructured text, constrained model calls and validation boundaries.

DifficultyC1
Time30 minutes
Main sourceJAMIA Open
OutputHybrid SP workflow

Why this reading

Keep formal logic formal. Use AI only at the unstructured boundary.

The article presents a hybrid architecture: structured FHIR data continue through deterministic CQL execution, while an LLM is invoked only for selected free-text questions.

This is directly relevant to statistical programming. SAS checks, metadata rules and controlled terminology can remain deterministic; the LLM can be reserved for narrow interpretation tasks that existing rules cannot resolve.

Reading order

Your 30-minute plan.

0-3 minPreview

Predict which steps should remain deterministic.

3-15 minMain article

Read the Abstract, Architecture, Implementation, Feasibility Test and Discussion.

15-20 minFDA principles

Focus on context of use, risk, standards and lifecycle management.

20-25 minCDISC direction

Connect AI-assisted rule authoring with automated validation.

25-30 minOutput

Design one hybrid SP workflow with a narrow LLM boundary.

Open-access sources

Architecture, governance and standards.

Brief background

A narrow model call inside a larger deterministic system.

CQL expresses computable clinical logic over structured healthcare data. The proposed pipeline is triggered only when a rule references unstructured text.

The system maps formal logic to a natural-language query, extracts relevant facts from clinical notes and returns a binary result to the standard execution engine.

On 100 balanced test statements, Phi-3-Mini achieved 72% accuracy and Llama 3.1 8B achieved 93%. The larger model reduced false positives from 17 to 3 and false negatives from 11 to 4.

The authors emphasize that performance depends on model, prompt and hyperparameters. Higher-risk uses require uncertainty handling and human escalation.

Key vocabulary

Fifteen terms worth retrieving.

Term中文Meaning / use
Clinical Quality Language (CQL)临床质量语言A domain-specific language for expressing computable clinical logic.
unstructured data非结构化数据Free text that does not follow a fixed tabular or coded schema.
execution engine执行引擎Software that interprets and runs formal logic.
LLM-in-the-Loop大模型嵌入执行环A design in which an LLM is called only for selected steps.
FHIR resourceFHIR 资源A standardized unit of healthcare information exchange.
DocumentReference文档引用资源A FHIR resource pointing to clinical documents or notes.
binary classification二元分类A decision between two outcomes, such as true or false.
query-relevant facts与查询相关的事实Evidence extracted specifically for one question.
backward compatibility向后兼容性The ability to preserve existing tools and workflows.
model-agnostic模型无关的Designed to work with different models.
false positive假阳性A positive prediction when the condition is actually absent.
false negative假阴性A negative prediction when the condition is actually present.
runtime configuration运行时配置Settings supplied when the system executes.
human escalation人工升级处理Routing uncertain or high-risk cases to qualified reviewers.
context of use使用情境The specific purpose and conditions under which a model is used.

Useful phrases

Language for a workflow-design discussion.

  1. invoke the LLM only when needed - The engine invokes the LLM only when unstructured text is referenced.
  2. preserve the existing deterministic pathway - Structured data preserves the existing deterministic pathway.
  3. translate formal logic into a natural-language query - The pipeline translates formal logic into a natural-language query.
  4. extract query-relevant facts - The model first extracts query-relevant facts from the note.
  5. return a constrained binary response - The LLM returns a constrained binary response to the execution engine.
  6. reduce the surface area for hallucination - Narrow task scope can reduce the surface area for hallucination.
  7. remain sensitive to prompt and model choice - Performance remains sensitive to prompt and model choice.
  8. require domain-targeted evaluation - Each use case requires domain-targeted evaluation.
  9. escalate uncertain outputs for human review - The system should escalate uncertain outputs for human review.
  10. fit the declared context of use - Validation evidence must fit the declared context of use.

Comprehension

Five questions.

  1. Which data continue through normal CQL execution?
  2. What steps connect an unstructured note to a binary result?
  3. How did the two local models differ?
  4. Why can a narrow binary task reduce hallucination risk?
  5. What additional controls are needed for high-risk use?

Retelling

Say it three times.

  • 30 seconds · Problem -> boundary -> result.
  • 45 seconds · Formal rule -> natural-language query -> facts -> true/false -> execution.
  • 60 seconds · Apply the pattern to ADaM or TFL work.

5-minute output task

Design a hybrid SP workflow.

Your role: Propose one bounded LLM step inside a deterministic programming system.

  1. Minute 1: Choose one narrow task.
  2. Minutes 2-3: Define the deterministic pathway, LLM trigger, evidence and output schema.
  3. Minute 4: Add gold-standard testing, uncertainty handling, regression tests and escalation.
  4. Minute 5: State acceptance criteria and mandatory human-review cases.

One sentence to keep

The safest role for an LLM in a regulated workflow is often to resolve one narrow unstructured-data problem and return a constrained, testable result.